From: Johannes Sixt <j6t@kdbg.org>
To: Siddh Raman Pant <siddh.raman.pant@oracle.com>
Cc: Kristoffer Haugsbakk <code@khaugsbakk.name>,
Junio C Hamano <gitster@pobox.com>,
Patrick Steinhardt <ps@pks.im>, Elijah Newren <newren@gmail.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
Jeff King <peff@peff.net>,
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
git@vger.kernel.org
Subject: Re: [PATCH v3 4/4] notes: support an external command to display notes
Date: Wed, 24 Jun 2026 09:49:26 +0200 [thread overview]
Message-ID: <3a2ba6c0-4ced-4d2c-820e-401c2dff1dd1@kdbg.org> (raw)
In-Reply-To: <7284a8bccb6bfb5734adb09f05ae4b61a63da2df.1779532562.git.siddh.raman.pant@oracle.com>
Am 23.05.26 um 12:38 schrieb Siddh Raman Pant:
> git notes is a very very helpful feature to show user-supplied
> information about a commit alongside its message transparently.
>
> For distributed teams working on large git repos (huge number of
> branches/refs, files, etc.) and using the notes feature to mark
> information on git commits, the problem is often not that two users
> update the same note object at the same time. It is that the local
> notes state used while reading history can be stale.
>
> In kernel work, the same logical upstream fix can appear as different
> commit objects across many downstream branches, such as the stable
> branches and vendor-specific branches (based on which the released
> kernel is actually built). Different developers may be working on those
> branches in parallel, and a review decision recorded for one backport
> is useful context for the others.
>
> Today, seeing that decision in ordinary history output requires first
> synchronizing the local notes ref, and then interpreting those notes
> for the branch being inspected. The latter step is workflow-specific
> and can be cheap, but keeping the local notes state fresh enough can be
> expensive in a large kernel repository with a large shared notes
> history (and if we are to extrapolate, a slow git server conn/ops can
> be a factor too).
>
> This TOCTOU problem exacerbates on scale (rapid updates, more devs,
> larger repos, more git server traffic, etc).
>
> One solution to this is to move the freshness policy out of git so that
> it is someone else's problem. We can have a realtime fetch or faster
> updation via external helper means. But unfortunately we lose the
> coherence in the display of information, and so the user would end up
> reinventing git log in his quest to have same workflow.
You are presenting one solution here. But a more obvious solution would
have been to make Git's notes implementation capable enough to keep up
with the volume of notes that are produced by your team.
Another solution would be to track the information outside of Git notes
entirely, similar to how pull requests, issues, reviews, and
conversations are tracked by Git hosters in databases outside of Git.
> Let's add support for notes.externalCommand, a protected-configuration
> command that git runs as a long-lived helper when displaying notes. git
> sends commit IDs to the helper and displays any returned text through
> the existing notes formatting path. This keeps presentation in git
> while letting the helper decide how fresh note text is obtained.
To my eyes, this looks like an overengineered solution that helps one
user of a niche feature of Git.
-- Hannes
next prev parent reply other threads:[~2026-06-24 7:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 10:38 [PATCH v3 0/4] Add support for an external command for fetching notes Siddh Raman Pant
2026-05-23 10:38 ` [PATCH v3 1/4] notes: convert raw arg in format_display_notes() to bool Siddh Raman Pant
2026-05-23 10:38 ` [PATCH v3 2/4] wrapper: add support for timeout and deadline in read helpers Siddh Raman Pant
2026-05-23 10:38 ` [PATCH v3 3/4] t3301: cover generic displayed notes behavior Siddh Raman Pant
2026-05-23 10:38 ` [PATCH v3 4/4] notes: support an external command to display notes Siddh Raman Pant
2026-06-24 7:49 ` Johannes Sixt [this message]
2026-06-24 9:53 ` Siddh Raman Pant
2026-05-28 5:59 ` [PATCH v3 0/4] Add support for an external command for fetching notes Siddh Raman Pant
2026-06-16 10:59 ` Siddh Raman Pant
2026-06-22 4:45 ` Siddh Raman Pant
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=3a2ba6c0-4ced-4d2c-820e-401c2dff1dd1@kdbg.org \
--to=j6t@kdbg.org \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=oswald.buddenhagen@gmx.de \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
--cc=siddh.raman.pant@oracle.com \
/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