Re: --no-decorate and %d in git-log(1)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2026, 18:29 UTC
- Message-ID
- <xmqq4in4brt3.fsf@gitster.g>
- In-Reply-To
- <aZ81X6ERyx5fcm6L@devuan>
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.
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?