5 ms·
A few slightly better aliases with graphs on the left: lg50 = "!git log --graph --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00
by drtse4 14y ago
A few slightly better aliases with graphs on the left:
lg50 = "!git log --graph --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
lg80 = "!git log --graph --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-80s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R"
Note: i've been using them for some time, i don't even remember who was the original source...
On an unrelated note, does someone remember how to add code sections? :)
- dbaupp 14y agoTry indenting by a few spaces (I think it is four).
- saraid216 14y agoTwo spaces.
- insipid 14y agoI got them from here: http://pyrtsa.posterous.com/aligning-your-git-logs http://pyrtsa.posterous.com/aligning-your-git-logs (which also has the list-not-graph versions). [Which is what I was going to comment, but you beat me to it.]
- chmike 14y agoWhen I use these the commit comment lines are not truncated. Is this the normal behavior ?
- drtse4 14y agoSadly, yes..