From 6244b24906f9efa4c1d573fa79e73eaf8e557551 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 8 Jul 2006 10:56:28 +0200 Subject: Close the index file between writing and committing Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- builtin-rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-rm.c') diff --git a/builtin-rm.c b/builtin-rm.c index 4d56a1f070..875d8252fa 100644 --- a/builtin-rm.c +++ b/builtin-rm.c @@ -147,7 +147,7 @@ int cmd_rm(int argc, const char **argv, char **envp) 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"); } -- cgit v1.2.3