]> git.ipfire.org Git - thirdparty/git.git/commit
midx.c: guard against commit_lock_file() failures
authorTaylor Blau <me@ttaylorr.com>
Fri, 8 Oct 2021 21:46:38 +0000 (17:46 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Oct 2021 20:08:11 +0000 (13:08 -0700)
commitae22e8415d5ec2b52a4c83e181297ac15aeaced0
tree02151eb52b59cfd8f816743f1f4fcd24971c7360
parentc0f1f9dec4457ffecf9e087665e6eb28da19c18f
midx.c: guard against commit_lock_file() failures

When writing a MIDX, we atomically move the new MIDX into place via
commit_lock_file(), but do not check to see if that call was successful.

Make sure that we do check in order to prevent us from incorrectly
reporting that we wrote a new MIDX if we actually encountered an error.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c