Merge branch 'nd/multiple-work-trees'
[gitweb.git] / sha1_file.c
index f860d67744784f69b83733757b9a894df3563de7..47c4929eb7060724411532dd0cec894067393d5e 100644 (file)
@@ -405,7 +405,7 @@ void add_to_alternates_file(const char *reference)
 {
        struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
        int fd = hold_lock_file_for_append(lock, git_path("objects/info/alternates"), LOCK_DIE_ON_ERROR);
-       char *alt = mkpath("%s\n", reference);
+       const char *alt = mkpath("%s\n", reference);
        write_or_die(fd, alt, strlen(alt));
        if (commit_lock_file(lock))
                die("could not close alternates file");