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

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

From
ACAlejandro Colomar <alx@kernel.org>
Date
Feb 25, 2026, 17:55 UTC
Message-ID
<aZ81X6ERyx5fcm6L@devuan>
Hi!
I use a custom alias that is very similar to
	git log --oneline
The reason is that the command above doesn't show the signatures on
commits, and if I were to show it (--show-signature) that would take too
much space (I really want --oneline).  So I use the following format:
	--format=tformat:'%C(magenta)%G?%C(reset) %C(auto)%h%d%C(reset) %C(auto)%s%C(reset)'

which imitates --oneline, except for the %G? at the beginning of the format.

A problem with it is that '%d' is unconditional. I'd like to be able to use --no-decorate to turn it off. This would be consistent with %h being affected by core.abbrev, and %cd and %ad being affected by log.date.

Would you mind changing %d to be affected by --decorate=?

Have a lovely day! Alex

-- 
<https://www.alejandro-colomar.es>
Next: Junio C Hamano
Message 1 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.