Git development
 help / color / mirror / Atom feed
From: Siddh Raman Pant <siddh.raman.pant@oracle.com>
To: "j6t@kdbg.org" <j6t@kdbg.org>
Cc: "oswald.buddenhagen@gmx.de" <oswald.buddenhagen@gmx.de>,
	"gitster@pobox.com" <gitster@pobox.com>,
	"code@khaugsbakk.name" <code@khaugsbakk.name>,
	"peff@peff.net" <peff@peff.net>, "ps@pks.im" <ps@pks.im>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	"sandals@crustytoothpaste.net" <sandals@crustytoothpaste.net>,
	"newren@gmail.com" <newren@gmail.com>
Subject: Re: [PATCH v3 4/4] notes: support an external command to display notes
Date: Wed, 24 Jun 2026 09:53:28 +0000	[thread overview]
Message-ID: <76cc093d2835a7b3ed110e20f1480dbe5fc2ecbb.camel@oracle.com> (raw)
In-Reply-To: <3a2ba6c0-4ced-4d2c-820e-401c2dff1dd1@kdbg.org>

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

On Wed, Jun 24 2026 at 13:19:26 +0530, Johannes Sixt wrote:
> > 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.

Git storage is inherently based on refs, so that would require massive
changes IMO. The actual fundamental problem here is that only the
latest state is useful at any given point of time, and not the past
history.

> 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.

This is precisely what this allows for. The information is tracked
outside of Git, and the notes path just shows it along with the commit.

A developer works on the code using Git. An external website doesn't
allow the same level of coherence in display of information as a note.
The commit is a fundamental unit of change. IMO it makes sense for Git
to be able to show a note about it from a provided external medium.

> > 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.

This can also allow for other uses too. For example, searching lore I
just found out that a colleague in Oracle Linux (Vegard) was trying to
solve a related problem in 2022:

https://lore.kernel.org/git/20220802075401.2393-1-vegard.nossum@oracle.com/

I think it was for achieving something like this more generally:
https://git.kernel.org/pub/scm/linux/kernel/git/vegard/linux.git/commit/?id=339f83612f3a569b194680768b22bf113c26a29d

An external notes command can be a solution for it.

Thanks,
Siddh

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-06-24  9:53 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
2026-06-24  9:53     ` Siddh Raman Pant [this message]
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=76cc093d2835a7b3ed110e20f1480dbe5fc2ecbb.camel@oracle.com \
    --to=siddh.raman.pant@oracle.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=newren@gmail.com \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=sandals@crustytoothpaste.net \
    /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