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>
This commit is contained in:
3
bundle.c
3
bundle.c
@ -186,7 +186,8 @@ int create_bundle(struct bundle_header *header, const char *path,
|
||||
if (bundle_to_stdout)
|
||||
bundle_fd = 1;
|
||||
else
|
||||
bundle_fd = hold_lock_file_for_update(&lock, path, 1);
|
||||
bundle_fd = hold_lock_file_for_update(&lock, path,
|
||||
LOCK_DIE_ON_ERROR);
|
||||
|
||||
/* write signature */
|
||||
write_or_die(bundle_fd, bundle_signature, strlen(bundle_signature));
|
||||
|
Reference in New Issue
Block a user