public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: git@vger.kernel.org
Subject: --no-decorate and %d in git-log(1)
Date: Wed, 25 Feb 2026 18:55:26 +0100	[thread overview]
Message-ID: <aZ81X6ERyx5fcm6L@devuan> (raw)

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

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>

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

             reply	other threads:[~2026-02-25 17:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25 17:55 Alejandro Colomar [this message]
2026-02-25 18:29 ` --no-decorate and %d in git-log(1) Junio C Hamano
2026-02-25 18:36   ` Alejandro Colomar
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=aZ81X6ERyx5fcm6L@devuan \
    --to=alx@kernel.org \
    --cc=git@vger.kernel.org \
    /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