From: Jeff King Date: Sun, 02 May 2010 05:40:04 GMT Subject: Re: [PATCH v3 2/5] pretty: make %H/%h/etc respect --abbrev[-commit] Message-ID: <20100502054004.GA19267@coredump.intra.peff.net> In-Reply-To: <7v39yazx4i.fsf@alter.siamese.dyndns.org> On Sat, May 01, 2010 at 10:33:01PM -0700, Junio C Hamano wrote: > >> > Here we make "git log --pretty=%H --abbrev-commit" synonymous with > >> > "git log --pretty=%h", and make %h/abbreviated-%H respect the length > >> > specified for --abbrev. > >> > >> I think it is a good change to make %h follow --abbrev, but %H should stay > >> the full length no matter what (otherwise why would anybody use %H not %h?). > > > > But I thought the point of %h was to be abbreviated? If it follows > > --abbrev, then "git log --format=%h" would show the full sha1, no? > > Sorry, but I meant that the point of %h was to be abbreviated and the > point of %H was not to be abbreviated. So no matter whaqt --abbrev-commit > says on the command line, --format=%H should show the full commit object > name. Ah, I see. So the change you called "good" above was that %h should respect --abbrev=10, but keep the same default? I do think that's an improvement, but it discards what Will was trying to accomplish (a placeholder that behaves different depending on whether abbreviation has been requested). I guess we would need a new syntax for that. -Peff