git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ACAlejandro Colomar <alx@kernel.org>
Date
Feb 25, 2026, 18:36 UTC
Message-ID
<aZ9AuD3dYzCKtI0s@devuan>
In-Reply-To
<xmqq4in4brt3.fsf@gitster.g>
Hi Junio,
On 2026-02-25T10:29:12-0800, Junio C Hamano wrote:
Show 7 quoted lines
> 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.
Show 8 quoted lines
> 
> 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>
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “--no-decorate and %d in git-log(1)”
  1. Alejandro ColomarFeb 25, 2026
  2. Junio C HamanoFeb 25, 2026
  3. Alejandro ColomarFeb 25, 2026
  4. Junio C HamanoFeb 25, 2026
  5. Marc BranchaudFeb 25, 2026
  6. Junio C HamanoFeb 25, 2026
  7. Marc BranchaudFeb 25, 2026
  8. Alejandro ColomarFeb 25, 2026
  9. Junio C HamanoMar 1, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.