summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--midx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/midx.c b/midx.c
index f2c976051d..8433086ac1 100644
--- a/midx.c
+++ b/midx.c
@@ -1423,7 +1423,8 @@ static int write_midx_internal(const char *object_dir,
if (ctx.m)
close_object_store(the_repository->objects);
- commit_lock_file(&lk);
+ if (commit_lock_file(&lk) < 0)
+ die_errno(_("could not write multi-pack-index"));
clear_midx_files_ext(object_dir, ".bitmap", midx_hash);
clear_midx_files_ext(object_dir, ".rev", midx_hash);