diff --git a/builtin-rm.c b/builtin-rm.c
index a3d25e6a571584c486d252c5a8e2b182f3da86e3..c0a8bb6cf5675d671a2cca50bf72d5c60f155313 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
if (active_cache_changed) {
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");
}