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-add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin-add.c') diff --git a/builtin-add.c b/builtin-add.c index bfbbb1bf52..2d25698173 100644 --- a/builtin-add.c +++ b/builtin-add.c @@ -181,7 +181,7 @@ int cmd_add(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