aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-09-23 14:27:33 -0700
committerJunio C Hamano <gitster@pobox.com>2011-09-23 14:27:33 -0700
commit84b051462fcaf9892f31f178a47c261ddd5c9695 (patch)
tree32d2ed754ed0948d261e3b16023f68e42854fe82 /sha1_file.c
parent406c1c4dd4a8f0fac3fddce1e7bb3b66af835e6a (diff)
parente6baf4a1ae1bb75d59967066ade1290cf105dcd8 (diff)
downloadgit-84b051462fcaf9892f31f178a47c261ddd5c9695.tar.gz
git-84b051462fcaf9892f31f178a47c261ddd5c9695.tar.xz
Merge branch 'jc/maint-clone-alternates' into maint
* jc/maint-clone-alternates: clone: clone from a repository with relative alternates clone: allow more than one --reference
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
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");