count-objects: report unused files in $GIT_DIR/worktrees/...
[gitweb.git] / notes-merge.c
index fd5fae255d2760d6b7895e95cee627b5e28f776e..f39e906a34695d4f21b7c8d5f99ebdecf3ae861e 100644 (file)
@@ -280,7 +280,7 @@ static void check_notes_merge_worktree(struct notes_merge_options *o)
                                    "(%s exists).", git_path("NOTES_MERGE_*"));
                }
 
-               if (safe_create_leading_directories(git_path(
+               if (safe_create_leading_directories_const(git_path(
                                NOTES_MERGE_WORKTREE "/.test")))
                        die_errno("unable to create directory %s",
                                  git_path(NOTES_MERGE_WORKTREE));
@@ -295,8 +295,8 @@ static void write_buf_to_worktree(const unsigned char *obj,
                                  const char *buf, unsigned long size)
 {
        int fd;
-       char *path = git_path(NOTES_MERGE_WORKTREE "/%s", sha1_to_hex(obj));
-       if (safe_create_leading_directories(path))
+       const char *path = git_path(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))
                die("found existing file at '%s'", path);
@@ -549,7 +549,7 @@ int notes_merge(struct notes_merge_options *o,
               o->local_ref, o->remote_ref);
 
        /* Dereference o->local_ref into local_sha1 */
-       if (read_ref_full(o->local_ref, local_sha1, 0, NULL))
+       if (read_ref_full(o->local_ref, 0, local_sha1, NULL))
                die("Failed to resolve local notes ref '%s'", o->local_ref);
        else if (!check_refname_format(o->local_ref, 0) &&
                is_null_sha1(local_sha1))