X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_file.c;h=32268d11d0c929624729b01f143845b13d7a569c;hb=e65ceb61cd7d3fabedea8cb545f8c210b48552d4;hp=92e87ee2254b6e7a675ad2bdf5111ef7a9b8b5ec;hpb=5d4fcd9ac0478ef6c5164ef5175474d4e1437525;p=git.git diff --git a/sha1_file.c b/sha1_file.c index 92e87ee22..32268d11d 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -380,7 +380,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/objects\n", reference); + char *alt = mkpath("%s\n", reference); write_or_die(fd, alt, strlen(alt)); if (commit_lock_file(lock)) die("could not close alternates file");