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

[RFC] plumbing git-notes

From
Dmitry Ivankov <divanorama@gmail.com>
Date
Jul 29, 2011, 13:24 UTC
Message-ID
<CA+gfSn_ay555SCfW=BzcF=73GpG1fckQoiAzpGcR-J5AyoV-mw@mail.gmail.com>
Hi,
Currently git accepts notes tree specification only as a ref under ref/notes/.
We can't say
GIT_NOTES_DISPLAY_REF=  GIT_NOTES_REF= \
  git log --show-notes=refs/notes/commits^
# this one is weird, we neither say "ref is invalid" nor show the notes
or
GIT_NOTES_DISPLAY_REF=  GIT_NOTES_REF= \
  git log --show-notes=`git rev-parse refs/notes/commits`

There is a problem if for some plumbing we'd want to read or write notes from some other place. From a temporary branch for example. A remote helper may want to utilize notes as a private map from objects to some data that is not a part of commit (say it can change for old objects, like revprops in svn). And also it may want to expose this map.

Another problem is working with a notes tree like with a regular tree. Merging, rebasing, etc can be done, but we can't map temporary notes revs to objects, unless they are kept as refs/notes/some_tmp_note.

One more question is the notes for a remote repository. We don't clone refs/notes/ by default, but where do we keep them if we'd want them to be tracked? refs/remotes/origin/notes/ refs/notes/remotes/origin/ refs/notes/origin/ refs/remote-notes/origin/ refs/notes/user_decides_which

We have remote refspec defaults: refs/heads/*:refs/remotes/origin* refs/tags/*:refs/tags/*. What will be the destination for: refs/notes/*?

Btw, isn't it a bug:
(git init a && cd a && touch a && git add a && git commit -m a && git tag 123)
(git init b && cd b && touch b && git add b && git commit -m b && git tag 123)
(cd a && git remote add b ../a && git remote update)
Fetching b
From ../a
 * [new branch]      master     -> b/master
# we didn't store refs/tags/123 from b to anywhere and didn't say
anything about it
Message 1 of 1 in “[RFC] plumbing git-notes”
  1. Dmitry IvankovJul 29, 2011

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.