--no-decorate and %d in git-log(1)
- From
- Alejandro 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>