Re: [PATCH 07/18] builtin/notes.c: Split notes ref DWIMmery into a separate function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johan Herland
Date: Thursday, October 7, 2010 - 6:56 am

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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/18] git notes merge, Johan Herland, (Tue Sep 28, 5:23 pm)
Re: [PATCH 00/18] git notes merge, Sverre Rabbelier, (Wed Sep 29, 7:56 am)
Re: [PATCH 00/18] git notes merge, Johan Herland, (Wed Sep 29, 8:16 am)
Re: [PATCH 00/18] git notes merge, Sverre Rabbelier, (Wed Sep 29, 8:20 am)
Re: [PATCH 00/18] git notes merge, Johan Herland, (Wed Sep 29, 9:04 am)
Re: [PATCH 14/18] git notes merge: Manual conflict resolut ..., Ævar Arnfjörð Bjarmason, (Wed Sep 29, 9:19 am)
Re: [PATCH 10/18] git notes merge: Handle real, non-confli ..., Ævar Arnfjörð Bjarmason, (Wed Sep 29, 9:20 am)
Re: [PATCH 07/18] builtin/notes.c: Split notes ref DWIMmer ..., Johan Herland, (Thu Oct 7, 6:56 am)