From: Junio C Hamano <gitster@pobox•com>
To: "Bence Ferdinandy" <bence@ferdinandy•com>
Cc: <git@vger•kernel.org>
Subject: Re: log --format existence of notes?
Date: Sat, 16 Nov 2024 09:06:38 +0900 [thread overview]
Message-ID: <xmqqsersyrch.fsf@gitster.g> (raw)
In-Reply-To: <D5N39IJA0WDQ.2WH1MNIP77X2J@ferdinandy.com> (Bence Ferdinandy's message of "Fri, 15 Nov 2024 23:00:30 +0100")
"Bence Ferdinandy" <bence@ferdinandy•com> writes:
> based on the man pages it doesn't seem possible, but maybe I'm missing something.
>
> I would like to put together a "log --format=" which is similar to --oneline,
> but where if there's a note for the commit it's marked with e.g. a notebook
> symbol. There's %N, but that prints the entire note, so it doesn't work well
> with one commit per line.
I do not think it is doable. Unlike the format language in the
for-each-ref/branch --list family of commands, the pretty-format
language in the log family of commands lack more involved
conditional formatting features.
Unifying these two formatting languages to port features from one to
the other would be needed, I guess. If we had a note support in the
latter, something like
$ git branch -l --format='%(subject)%(if)%(note:amlog)%(then)📓%(end)'
may have worked.
next prev parent reply other threads:[~2024-11-16 0:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 22:00 log --format existence of notes? Bence Ferdinandy
2024-11-16 0:06 ` Junio C Hamano [this message]
2024-11-16 15:11 ` Bence Ferdinandy
2024-11-20 17:04 ` [PATCH] ref-filter: add "notes" atom Kousik Sanagavarapu
2024-11-20 23:51 ` Junio C Hamano
2024-12-01 8:19 ` Kousik Sanagavarapu
2024-11-21 5:26 ` log --format existence of notes? Simon Richter
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=xmqqsersyrch.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=bence@ferdinandy$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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