index 70d619da8d051f8d739911cfbbf8a5255787ec07..7e42024c67a2c0fda72f94935b7d5a723c73d131 100644 (file)
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
* want to update cache.
*/
if (state.refresh_cache) {
- close(newfd); newfd = -1;
rollback_lock_file(&lock_file);
+ newfd = -1;
}
state.refresh_cache = 0;
}
if (0 <= newfd &&
(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");
return 0;
}