[RFC] plumbing git-notes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]