diff --git a/sha1_file.c b/sha1_file.c
index 70bb453be25d4e5ba05ee5f2565630a8994842f2..ab2b520f033c75e5e8d3434376a203add59559a4 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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))