X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_file.c;h=ab2b520f033c75e5e8d3434376a203add59559a4;hb=1e2bba92d21d9c72d4a6816c3a98a22779856f9e;hp=70bb453be25d4e5ba05ee5f2565630a8994842f2;hpb=6c1c3d175350e5fcd664552198f74893c5f14e86;p=git.git diff --git a/sha1_file.c b/sha1_file.c index 70bb453be..ab2b520f0 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -388,7 +388,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))