send-pack: read list of refs with strbuf_getline()
[gitweb.git] / builtin / notes.c
index bb23d5501c9a00818b880217d748c5fd1bcfe5cc..3775e389635a58f20538b621fd22980a38b78b0d 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>]]"),
@@ -290,7 +290,7 @@ static int notes_copy_from_stdin(int force, const char *rewrite_cmd)
                t = &default_notes_tree;
        }
 
-       while (strbuf_getline(&buf, stdin, '\n') != EOF) {
+       while (strbuf_getline_lf(&buf, stdin) != EOF) {
                unsigned char from_obj[20], to_obj[20];
                struct strbuf **split;
                int err;
@@ -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);