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

Re: [PATCH] notes: allow merging from arbitrary references

From
Johan Herland <johan@herland.net>
Date
Nov 15, 2015, 22:14 UTC
Message-ID
<CALKQrgcKxJqJn+3-rg4DCbT5CFDZW8o9GtCS=kh-iSy0YyGAUA@mail.gmail.com>
In-Reply-To
<1447432462-21192-1-git-send-email-jacob.e.keller@intel.com>
On Fri, Nov 13, 2015 at 5:34 PM, Jacob Keller <jacob.e.keller@intel.com> wrote:
Show 18 quoted lines
> From: Jacob Keller <jacob.keller@gmail.com>
>
> Create a new expansion function, expand_loose_notes_ref which will
> expand any ref using get_sha1, but falls back to expand_notes_ref if
> this fails. The contents of the strbuf will be either the hex string of
> the sha1, or the expanded notes ref. It is expected to be re-expanded
> using get_sha1 inside the notes merge machinery, and there is no real
> error checking provided at this layer.
>
> Since we now support merging from non-notes refs, remove the test case
> associated with that behavior. Add a test case for merging from a
> non-notes ref.
>
> Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
> ---
> I do not remember what version this was since it has been an age ago
> that I sent the previous code. This is mostly just a rebase onto current
> next. I believe I have covered everything previous reviewers noted.
Looks good to me.
Show 7 quoted lines
> I'm interested in whether this is the right direction, as my longterm
> goal is to be able to push/pull notes to a specific namespace (probably
> refs/remote-notes/*, since actually modifying to use
> refs/remotes/notes/* is difficult to send to users, and remote-notes
> makes the most useful sense). The first part of this is allowing merge
> to come from an arbitrary reference, as currently it is not really
> possible to merge from refs/remote-notes as we'd need it to be.
Yes, I agree that merging from refs outside refs/notes/ should become possible.
A related topic that has been discussed (although I cannot remember if
any conclusion was reached) is whether to allow more notes operations
- specifically _read-only_ operations - on notes trees outside
refs/notes/. I believe this should also become possible, although I
haven't thoroughly examined all implications.
...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Jacob KellerNext: Jacob Keller
Message 2 of 12 in “notes: allow merging from arbitrary references”
  1. notes: allow merging from arbitrary referencesJacob Keller, Nov 13, 2015
  2. Johan HerlandNov 15, 2015
  3. Jacob KellerNov 15, 2015
  4. Johan HerlandNov 16, 2015
  5. Jacob KellerNov 16, 2015
  6. Johan HerlandNov 18, 2015
  7. Jacob KellerNov 18, 2015
  8. Jeff KingNov 24, 2015
  9. Jeff KingNov 24, 2015
  10. Jacob KellerNov 26, 2015
  11. Junio C HamanoDec 11, 2015
  12. Jacob KellerDec 11, 2015

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.