aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-02 13:36:14 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-02 13:36:14 -0800
commit581000a4196d196d221bb6164a49a8a52ce30730 (patch)
treed177274e6739292d466213fc02abf5811bf86ce6 /sha1_file.c
parent1a9016aae5aa8c468bb2d8d5dd16303d5c005869 (diff)
parentacd3b9eca82e38950f94e4708b528b7dae09a7c8 (diff)
downloadgit-581000a4196d196d221bb6164a49a8a52ce30730.tar.gz
git-581000a4196d196d221bb6164a49a8a52ce30730.tar.xz
Merge branch 'jc/maint-co-track' into maint
* jc/maint-co-track: Enhance hold_lock_file_for_{update,append}() API demonstrate breakage of detached checkout with symbolic link HEAD Fix "checkout --track -b newbranch" on detached HEAD
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 c78507152..12fc767ee 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -385,7 +385,7 @@ static void read_info_alternates(const char * relative_base, int depth)
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"), 1);
+ int fd = hold_lock_file_for_append(lock, git_path("objects/info/alternates"), LOCK_DIE_ON_ERROR);
char *alt = mkpath("%s/objects\n", reference);
write_or_die(fd, alt, strlen(alt));
if (commit_lock_file(lock))