Merge branch 'jk/notes-merge-from-anywhere'
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Feb 2016 22:15:59 +0000 (14:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Feb 2016 22:15:59 +0000 (14:15 -0800)
"git notes merge" used to limit the source of the merged notes tree
to somewhere under refs/notes/ hierarchy, which was too limiting
when inventing a workflow to exchange notes with remote
repositories using remote-tracking notes trees (located in e.g.
refs/remote-notes/ or somesuch).

* jk/notes-merge-from-anywhere:
notes: allow merging from arbitrary references

1  2 
builtin/notes.c
notes.c
notes.h
diff --cc builtin/notes.c
index 9d54934d6c4ccf55ed24304a3da5a6fd0f0206ca,b16b8b56a0a2291f1a27be8e025ab3773197d77c..ed6f2222f4bf9c54535a7a23971c7749ca8d05d5
@@@ -809,10 -806,10 +809,10 @@@ static int merge(int argc, const char *
  
        o.local_ref = default_notes_ref();
        strbuf_addstr(&remote_ref, argv[0]);
-       expand_notes_ref(&remote_ref);
+       expand_loose_notes_ref(&remote_ref);
        o.remote_ref = remote_ref.buf;
  
 -      t = init_notes_check("merge");
 +      t = init_notes_check("merge", NOTES_INIT_WRITABLE);
  
        if (strategy) {
                if (parse_notes_merge_strategy(strategy, &o.strategy)) {
diff --cc notes.c
Simple merge
diff --cc notes.h
Simple merge