lockfile: do not rollback lock on failed close
[gitweb.git] / read-cache.c
index 51686518e061b8fe60ddac620815412ba6724efa..c3be65f8b097263f1e0e53f95510b8518ef755c1 100644 (file)
@@ -2345,7 +2345,7 @@ static int do_write_locked_index(struct index_state *istate, struct lock_file *l
        if (flags & COMMIT_LOCK)
                return commit_locked_index(lock);
        else if (flags & CLOSE_LOCK)
-               return close_lock_file(lock);
+               return close_lock_file_gently(lock);
        else
                return ret;
 }