Close the index file between writing and committing
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
a0c2089c1d
commit
6244b24906
@ -648,7 +648,7 @@ int cmd_update_index(int argc, const char **argv, char **envp)
|
||||
finish:
|
||||
if (active_cache_changed) {
|
||||
if (write_cache(newfd, active_cache, active_nr) ||
|
||||
commit_lock_file(lock_file))
|
||||
close(newfd) || commit_lock_file(lock_file))
|
||||
die("Unable to write new index file");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user