git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/2] notes: support fetching notes from an external repo

From
Vegard Nossum <vegard.nossum@oracle.com>
Date
Aug 3, 2022, 08:09 UTC
Message-ID
<69fd9dcf-7769-6c5c-ca0e-ea61e6d616d9@oracle.com>
In-Reply-To
<xmqqczdiirh8.fsf@gitster.g>
On 8/2/22 17:40, Junio C Hamano wrote:
Show 26 quoted lines
> Vegard Nossum <vegard.nossum@oracle.com> writes:
> 
>> Notes are currently always fetched from the current repo. However, in
>> certain situations you may want to keep notes in a separate repository
>> altogether.
>>
>> In my specific case, I am using cgit to display notes for repositories
>> that are owned by others but hosted on a shared machine, so I cannot
>> really add the notes directly to their repositories.
> 
> My gut reaction is that I am not interested at all in the above
> approach, even though the problem you are trying to solve is
> interesting.  Mostly because notes are not the only decorations your
> users may want.  What if you want to "log --decorate" their
> repository contents with your own tags that annotate their commits?
> A notes-only approach to mix repositories is way too narrow.
> 
> A usable alternative _might_ be to introduce a way to "borrow" refs
> and objects from a different repository as if you cloned from and
> continuously fetching from them.  We already have a mechanism to
> borrow objects from another repository in the form of "alternate
> object database" that lets us pretend objects in their repository
> are locally available.  We can invent a similar mechanism that lets
> any of their ref as if it were our local ref, e.g. their "main"
> branch at their refs/heads/main might appear to exist at our
> refs/borrowed/X/heads/main.  
Hi Junio,
Thanks for the reply.

To be clear, are you saying there is no way you would ever take my patches in their current form, even though they only rearrange internal workings (and have no other user-observable effects) to solve a problem I am currently facing?

The thing is, I personally have no use for displaying refs borrowed from another repository at this time, and I'm not sure I have either the time or the ability to provide what you are asking for.

I don't think my patches preclude adding "borrowed refs" as a feature at a later time, so can we not do that when somebody actually has a use for it?

Just to provide a bit more background: These two patches are just the first two in a bigger project to make extensive use of git notes to provide added value to the whole Linux kernel community -- in other words, this is not just for myself, I am trying here to upstream our internal patches for the benefit of everybody. I have cgit patches as well (but I'm waiting to submit them until git can support them) and hundreds of thousands of notes annotating Linux kernel commits with useful information.

Respectfully,
Vegard
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 8 in “notes: support fetching notes from an external repo”
  1. 1/2 notes: support fetching notes from an external repoVegard Nossum, Aug 2, 2022
  2. 2/2 notes: create interface to iterate over notes for a given oidVegard Nossum, Aug 2, 2022
  3. Junio C HamanoAug 2, 2022
  4. Vegard NossumAug 3, 2022
  5. Junio C HamanoAug 3, 2022
  6. Philip OakleyAug 30, 2022
  7. Vegard NossumOct 17, 2022
  8. Philip OakleyOct 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.