public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Marc Branchaud <marcnarc@xiplink.com>
Cc: Alejandro Colomar <alx@kernel.org>,  git@vger.kernel.org
Subject: Re: --no-decorate and %d in git-log(1)
Date: Wed, 25 Feb 2026 12:08:38 -0800	[thread overview]
Message-ID: <xmqqcy1sa8mx.fsf@gitster.g> (raw)
In-Reply-To: <8f6441ab-5c9a-4b42-ab2e-a670d462569d@xiplink.com> (Marc Branchaud's message of "Wed, 25 Feb 2026 12:46:40 -0700")

Marc Branchaud <marcnarc@xiplink.com> 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.

  reply	other threads:[~2026-02-25 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 17:55 --no-decorate and %d in git-log(1) Alejandro Colomar
2026-02-25 18:29 ` Junio C Hamano
2026-02-25 18:36   ` Alejandro Colomar
2026-02-25 18:56     ` Junio C Hamano
2026-02-25 19:46     ` Marc Branchaud
2026-02-25 20:08       ` Junio C Hamano [this message]
2026-02-25 21:46         ` Marc Branchaud
2026-02-25 21:54           ` Alejandro Colomar
2026-03-01  5:59           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqcy1sa8mx.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=alx@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=marcnarc@xiplink.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox