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

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

From
Adam Spiers <git@adamspiers.org>
Date
Apr 30, 2013, 00:40 UTC
Message-ID
<20130430004006.GF8768@pacific.linksys.moosehall>
In-Reply-To
<CALKQrgdH_Oh122tGKeD+chk5f6PwUvsisXjRp68QD_KMQt-9Bg@mail.gmail.com>
On Tue, Apr 30, 2013 at 02:32:33AM +0200, Johan Herland wrote:
> On Mon, Apr 29, 2013 at 11:40 PM, Adam Spiers <git@adamspiers.org> wrote:
[snipped]
Show 14 quoted lines
> > IMHO the more similar the merge's user experience is to a standard
> > merge, the better, since that would minimise the number of merging
> > workflows the user needs to learn.
> >
> > On this theme, I think ideally rebase should be supported too, and
> 
> IMHO the general discussion about rebase vs. merge is mostly about the
> shape of the resulting history. When it comes to notes, I have yet to
> see a use case where anybody really cares about the shape of the notes
> history, and hence I don't yet see how rebase would be useful for
> notes. In fact, it rather seems some people are more interested in
> storing their notes trees without any history at all (ISTR a
> discussion regarding the notes-cache feature, where we did NOT want to
> keep earlier versions of the cache alive).

That's a fair point; lack of rebase is certainly not a showstopper. In contrast, in our use case, a total lack of history could be quite annoying.

Show 39 quoted lines
> > I also have to manually update the fake tracking "branch":
> >
> >     git update-ref refs/notes/$remote/$GIT_NOTES_REF refs/notes/$GIT_NOTES_REF
> >
> >     # or if I want to make really sure this only happens if the push worked
> >     git fetch $remote refs/notes/$GIT_NOTES_REF:refs/notes/$remote/$GIT_NOTES_REF
> >
> > That's pretty ugly.  Couldn't we instead just reuse the existing
> > mechanisms?
> >
> >     remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
> >     remote.origin.fetch=+refs/notes/*:refs/note-remotes/origin/*
> 
> The remote refs namespace idea aims to solve this by providing refspecs like
> 
>     remote.origin.fetch=+refs/heads/*:refs/remotes/origin/heads/*
>     remote.origin.fetch=+refs/tags/*:refs/remotes/origin/tags/*
>     remote.origin.fetch=+refs/notes/*:refs/remotes/origin/notes/*
>     remote.origin.fetch=+refs/replace/*:refs/remotes/origin/replace/*
>     etc.
> 
> I'm currently working on some patches to make git work well in repos
> with those kinds of refspecs. I see that as the first step on the way
> to properly supporting remote ref namespaces.
> 
> >     branch.notes/commits.remote=origin
> >     branch.notes/commits.merge=refs/notes/commits
> 
> This looks like an natural extension of the branch upstream mechanism
> for notes. Personally, I'd rather have it look more like this:
> 
>   [notes "commits"]
>         remote = origin
>         merge = refs/notes/commits
> 
> or, in your notation:
> 
>     notes.commits.remote=origin
>     notes.commits.merge=refs/notes/commits
Ahah yes, that's nicer.  Thanks for the reply!
Previous: Johan HerlandNext: Adam Spiers
Message 7 of 8 in “git-icing: sugary wrapper around git-cherry”
  1. Adam SpiersApr 27, 2013
  2. git-rnotes: git-notes wrapper for sharing notes between repositoriesAdam Spiers, Apr 29, 2013
  3. improvements to checks for core.notesRef / GIT_NOTES_REF / --refAdam Spiers, Apr 29, 2013
  4. Junio C HamanoApr 29, 2013
  5. Adam SpiersApr 29, 2013
  6. Johan HerlandApr 30, 2013
  7. Adam SpiersApr 30, 2013
  8. tools for making upstreaming / backporting easier in gitAdam Spiers, Sep 21, 2013

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.