Re: [PATCH 1/4] gitweb: notes feature
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:48:12
On Sun, 7 Feb 2010, Giuseppe Bilotta wrote:
On Sun, Feb 7, 2010 at 7:38 PM, Junio C Hamano [off-list ref] wrote:quoted
Notes are fundamenally metainformation about an _object_ [*1*] and are not metainformation about refs. Since whatever magic notation to denote notes we choose wants to be applied to an arbitrary commit, it shouldn't be the at-brace syntax.Makes sense. ^{note[:namespace]} is ok for me too btw, although maybe it looks a little off-base when compared with the tag indicator ^{} which works, in a sense, in the opposite direction.
Well, notes refer to objects (commits), but the whole idea of notes
was to have easy mapping in the reverse direction, from object to
its annotations.
We could invent yet another syntax, e.g. ^@{} or ^@{<namespace>}
(following ^@ notation for parents, which can also return multiple SHA1s).
quoted
[Footnote] *1* Yes, I am aware of movements to misuse notes to annotate anything after mapping it to a random SHA-1 value, but I think that is outside the scope of notes. Our design decision should be based on supporting the primary use of annotating an object, and that might still keep such a use working, in which case that would be an added bonus. But our design shouldn't be constrained by such a secondary use.BTW, I still think that notes should be attachable to named refs (not SHA-1, thus) too.
I have just realized that it is totally no-go. Why? Because names of refs are local to repository: what is one 'master' might be other 'origin'; what is one 'for-linus' might be other 'from-alan', what's one 'refs/heads/next' might be other 'refs/remotes/origin/next'. Also I think that there would be problem with renaming and deleting refs. -- Jakub Narebski Poland