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
@ -2323,7 +2323,7 @@ int cmd_apply(int argc, const char **argv, char **envp)
|
||||
|
||||
if (write_index) {
|
||||
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