logging - Git log pretty format, newline after placeholder if non-empty -


i've got git alias log using pretty format:

lg = log -10 --graph --abbrev-commit --pretty=format:'%c(auto)%d%creset%n %c(bold yellow)%h%creset - %s %cgreen(%cr) %c(bold blue)<%an>%creset'

which gives following:

enter image description here

i can't seem find way make new line after reference names if placeholder non-empty.

the pretty formats wiki page has operators add or remove (+ or -) newline coming before placeholder not after.

this not supported natively git: have process/parse output right result)

but opportunity simple patch, 1 introduced pretty-format: %[+-]x mechanism: commit 9fa708d, git 1.6.6-rc1, oct. 2009.

maybe %[*/]x, adding line-feed after expansion of %x.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -