public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: --no-decorate and %d in git-log(1)
Date: Wed, 25 Feb 2026 19:36:24 +0100	[thread overview]
Message-ID: <aZ9AuD3dYzCKtI0s@devuan> (raw)
In-Reply-To: <xmqq4in4brt3.fsf@gitster.g>

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

Hi Junio,

On 2026-02-25T10:29:12-0800, Junio C Hamano wrote:
> Alejandro Colomar <alx@kernel.org> writes:
> 
> > Would you mind changing %d to be affected by --decorate=?
> 
> I would imagine everybody would strongly mind as the scripts they
> have already written and have been using for years will be broken by
> such a change.  So changing how %d works is a non-starter.

Makes sense.

> 
> But that does not mean we cannot add a different placeholder that
> behaves that way.  I wonder if it is the cleanest to extend the
> %(decoreate:<option>,...) notation, perhaps like
> 
>     $ git log --format="%(decorate:optional=yes)"
> 
> with and without --decorate/--no-decorate may be a way forward?

That could work for me.

Alternatively, we could add another level to --decorate=.  Currently,
there are --decorate[=(short|full|auto|no)].  We could add 'never' to
also exclude %d.

What do you think?


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-02-25 18:36 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 [this message]
2026-02-25 18:56     ` Junio C Hamano
2026-02-25 19:46     ` Marc Branchaud
2026-02-25 20:08       ` Junio C Hamano
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=aZ9AuD3dYzCKtI0s@devuan \
    --to=alx@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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