ident.c: add support for IPv6
[gitweb.git] / notes-merge.c
index f39e906a34695d4f21b7c8d5f99ebdecf3ae861e..b3d1dab51fb9e7aea4af05211326a1a91b1279d7 100644 (file)
@@ -295,7 +295,7 @@ static void write_buf_to_worktree(const unsigned char *obj,
                                  const char *buf, unsigned long size)
 {
        int fd;
-       const char *path = git_path(NOTES_MERGE_WORKTREE "/%s", sha1_to_hex(obj));
+       char *path = git_pathdup(NOTES_MERGE_WORKTREE "/%s", sha1_to_hex(obj));
        if (safe_create_leading_directories_const(path))
                die_errno("unable to create directory for '%s'", path);
        if (file_exists(path))
@@ -320,6 +320,7 @@ static void write_buf_to_worktree(const unsigned char *obj,
        }
 
        close(fd);
+       free(path);
 }
 
 static void write_note_to_worktree(const unsigned char *obj,
@@ -594,7 +595,7 @@ int notes_merge(struct notes_merge_options *o,
        assert(local && remote);
 
        /* Find merge bases */
-       bases = get_merge_bases(local, remote, 1);
+       bases = get_merge_bases(local, remote);
        if (!bases) {
                base_sha1 = null_sha1;
                base_tree_sha1 = EMPTY_TREE_SHA1_BIN;