From: Kyle J. McKay Date: Tue, 06 Jan 2015 08:03:52 GMT Subject: [PATCH v2 1/2] notes: accept any ref Message-ID: <4066d4aa9a52b58b40b3abed21eaf35@74d39fa044aa309eaea14b9f57fe79c> In-Reply-To: From: Scott Chacon Currently if you try to merge notes, the notes code ensures that the reference is under the 'refs/notes' namespace. In order to do any sort of collaborative workflow, this doesn't work well as you can't easily have local notes refs seperate from remote notes refs. This patch changes the expand_notes_ref function to check for simply a leading refs/ instead of refs/notes to check if we're being passed an expanded notes reference. This would allow us to set up refs/remotes-notes or otherwise keep mergeable notes references outside of what would be contained in the notes push refspec. Signed-off-by: Scott Chacon --- notes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes.c b/notes.c index c763a21e..7165a33f 100644 --- a/notes.c +++ b/notes.c @@ -1292,7 +1292,7 @@ int copy_note(struct notes_tree *t, void expand_notes_ref(struct strbuf *sb) { - if (starts_with(sb->buf, "refs/notes/")) + if (starts_with(sb->buf, "refs/")) return; /* we're happy */ else if (starts_with(sb->buf, "notes/")) strbuf_insert(sb, 0, "refs/", 5); -- 2.1.4