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-update-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-update-index.c') diff --git a/builtin-update-index.c b/builtin-update-index.c index ef50243452..1a4200d151 100644 --- a/builtin-update-index.c +++ b/builtin-update-index.c @@ -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"); } -- cgit v1.2.3