lockfile: report when rollback fails
We do not report to the caller when rolling back a lockfile fails, which will be needed by the reftable compaction logic in a subsequent commit. It also cannot really report on all errors because the function calls `delete_tempfile()`, which doesn't return an error either. Refactor the code so that both `delete_tempfile()` and `rollback_lock_file()` return an error code. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b387623c12
commit
4ae540d421
@ -269,7 +269,7 @@ int reopen_tempfile(struct tempfile *tempfile);
|
||||
* `delete_tempfile()` for a `tempfile` object that has already been
|
||||
* deleted or renamed.
|
||||
*/
|
||||
void delete_tempfile(struct tempfile **tempfile_p);
|
||||
int delete_tempfile(struct tempfile **tempfile_p);
|
||||
|
||||
/*
|
||||
* Close the file descriptor and/or file pointer if they are still
|
||||
|
Reference in New Issue
Block a user