diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-17 15:44:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-19 12:35:37 -0700 |
commit | acd3b9eca82e38950f94e4708b528b7dae09a7c8 (patch) | |
tree | f341dae377b97e9c7fd9746208be0fee56bda438 /sha1_file.c | |
parent | f5637549a7eb93883839de01399418e10bf81768 (diff) | |
download | git-acd3b9eca82e38950f94e4708b528b7dae09a7c8.tar.gz git-acd3b9eca82e38950f94e4708b528b7dae09a7c8.tar.xz |
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 e2cb342a3..5cfae5d1a 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)) |