]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/notes.c
notes: allow merging from arbitrary references
[thirdparty/git.git] / builtin / notes.c
index bb23d5501c9a00818b880217d748c5fd1bcfe5cc..b16b8b56a0a2291f1a27be8e025ab3773197d77c 100644 (file)
@@ -19,7 +19,7 @@
 #include "string-list.h"
 #include "notes-merge.h"
 #include "notes-utils.h"
-#include "branch.h"
+#include "worktree.h"
 
 static const char * const git_notes_usage[] = {
        N_("git notes [--ref <notes-ref>] [list [<object>]]"),
@@ -707,7 +707,7 @@ static int merge_commit(struct notes_merge_options *o)
                die("Could not parse commit from NOTES_MERGE_PARTIAL.");
 
        if (partial->parents)
-               hashcpy(parent_sha1, partial->parents->item->object.sha1);
+               hashcpy(parent_sha1, partial->parents->item->object.oid.hash);
        else
                hashclr(parent_sha1);
 
@@ -806,7 +806,7 @@ static int merge(int argc, const char **argv, const char *prefix)
 
        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");