Thread (15 messages) 15 messages, 3 authors, 2016-06-15

Re: [PATCH v3 2/5] pretty: make %H/%h/etc respect --abbrev[-commit]

From: Jeff King <hidden>
Date: 2016-06-15 22:48:44

On Sat, May 01, 2010 at 08:13:00PM -0700, Junio C Hamano wrote:
Will Palmer [off-list ref] writes:
quoted
Prior to this, the output of %H was always 40 characters long, and the
output of %h always DEFAULT_ABBREV characters long, without regard to
whether --abbrev-commit or --abbrev had been passed.

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?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help