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:
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
Post a Comment