On Tuesday 5. October 2010 17.50.53 Jonathan Nieder wrote:
FTR, that rule is not introduced by this patch, the patch merely moves it into
a separate function.
Indeed, if you keep notes refs outside refs/notes, the current behaviour is
not very user-friendly. So far, we've required all notes refs to be within
refs/notes. (See for example init_notes_check() in builtin/notes.c, which
refuses to work with notes refs outside 'refs/notes/', hence was probably the
reason for adding the above code in the first place.)
I guess this moves us towards the discussion of how to handle remote notes
refs and how to synchronize them on fetch/push. In short, if we want to keep
notes refs outside of refs/notes (e.g. in refs/remotes/foo/notes), we need to
change this part of the code.
I assuming you're talking about the revision args parser's DWIMing of "foo"
into the first existing ref in the following list:
1. $GIT_DIR/foo
2. refs/foo
3. refs/tags/foo
4. refs/heads/foo
5. refs/remotes/foo
6. refs/remotes/foo/HEAD
If we want to reuse this DWIMery, we obviously want a different list of "auto-
completions". Maybe something like:
1. refs/notes/foo
2. refs/remote-notes/foo (depends on how we organize remote notes refs)
3. ?
Thanks, I expect future patches to change this code in order to deal with
remote notes refs. For the purposes of the current patch series, I will assume
that all notes refs live under refs/notes.
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html