diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-18 00:44:39 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-19 21:35:37 +0200 |
commit | acd3b9eca82e38950f94e4708b528b7dae09a7c8 (patch) | |
tree | f341dae377b97e9c7fd9746208be0fee56bda438 /sha1_file.c | |
parent | demonstrate breakage of detached checkout with symbolic link HEAD (diff) | |
download | git-acd3b9eca82e38950f94e4708b528b7dae09a7c8.tar.xz git-acd3b9eca82e38950f94e4708b528b7dae09a7c8.zip |
Enhance hold_lock_file_for_{update,append}() API
This changes the "die_on_error" boolean parameter to a mere "flags", and
changes the existing callers of hold_lock_file_for_update/append()
functions to pass LOCK_DIE_ON_ERROR.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index e2cb342a32..5cfae5d1ad 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)) |