summaryrefslogtreecommitdiffstats
path: root/read-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 2fc1182f22..5ffb1d7bb6 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -2042,7 +2042,7 @@ void set_alternate_index_output(const char *name)
static int commit_locked_index(struct lock_file *lk)
{
if (alternate_index_output) {
- if (lk->fd >= 0 && close_lock_file(lk))
+ if (close_lock_file(lk))
return -1;
if (rename(lk->filename, alternate_index_output))
return -1;