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:
@ -89,7 +89,8 @@ int pack_refs(unsigned int flags)
|
||||
memset(&cbdata, 0, sizeof(cbdata));
|
||||
cbdata.flags = flags;
|
||||
|
||||
fd = hold_lock_file_for_update(&packed, git_path("packed-refs"), 1);
|
||||
fd = hold_lock_file_for_update(&packed, git_path("packed-refs"),
|
||||
LOCK_DIE_ON_ERROR);
|
||||
cbdata.refs_file = fdopen(fd, "w");
|
||||
if (!cbdata.refs_file)
|
||||
die("unable to create ref-pack file structure (%s)",
|
||||
|
||||
Reference in New Issue
Block a user