From: Junio C Hamano Date: Wed, 03 Sep 2008 20:10:12 GMT Subject: Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration Message-ID: <7v4p4xat3v.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080903191217.GA31195@coredump.intra.peff.net> Jeff King writes: >> git log --pretty=format:'%H (%d) %s' > > I think Junio requested the enclosing parentheses be included. I am not > sure I agree, but we are already mandating the comma separator. > Personally, I think the right solution is more like > > %(decorate:delim=, ) > > but that is a much bigger change (and part of what was holding me up on > just improving this patch). I think adding %d in the meantime (with or > without the surrounding parentheses) is reasonable. I agree with the above reasoning. If we go with surrounding parentheses, it might even make sense to include a SP _before_ the opening parenthesis, so that "%h %s%d" expands to either of these: $ git show -s --pretty=format:'%h %s%d' v1.6.0^0 v1.6.0^1 ea02eef GIT 1.6.0 (refs/tags/v1.6.0) 373a273 Merge git-gui 0.11.0 Also I did not like the bug to misidentify "git log --grep=pretty=format:" you pointed out in your message.