Subject: Re: --no-decorate and %d in git-log(1)

From: Junio C Hamano <[email-masked]>
Date: Wed, 25 Feb 2026 12:08:38 -0800

Marc Branchaud <[email-masked]> writes:

> BTW, --decorate=auto is documented as "if the output is going to a 
> terminal, the ref names are shown as if `short` were given, otherwise no 
> ref names are shown."  But in my experiments %d still shows refs even 
> when the output is piped to a file.  Seems like another symptom of the 
> same bug?

Isn't that documentation merely referring to "git log" without
"--format=... %d ..." and not about the case where you explicitly
ask for "%d"?  That is, the description is there to explain the
differences between

	git log --oneline --decorate=auto -1
	git log --oneline --decorate=auto -1 | cat

isn't it?  I think --decorate=auto is the default so the above
without --decorate=auto would behave similarly.

> (Do people who use `--format` (with or without %d) *also* use 
> `--decorate`?  It seems like the two are naturally exclusive, even if 
> the code allows them both.)

That is an interesting question, but I am not sure if it affects how
we decide to resolve this discussion.