Reduce the number of connects when fetching
[gitweb.git] / builtin-update-index.c
index e1a938d8971f11e1a1e963913ab23ff6acc0cea9..c3a14c74ed00db592db55a018db37657148a9900 100644 (file)
@@ -738,7 +738,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
                            get_index_file(), strerror(lock_error));
                }
                if (write_cache(newfd, active_cache, active_nr) ||
-                   close(newfd) || commit_locked_index(lock_file))
+                   commit_locked_index(lock_file))
                        die("Unable to write new index file");
        }