read-cache: leave lock in right state in `write_locked_index()`
[gitweb.git] / sequencer.c
index 60636ce54b615e19a22dc2396211d56540b4e920..d56c3808198892f8088b2d70b6439e11d01624d0 100644 (file)
@@ -1183,7 +1183,6 @@ static int read_and_refresh_cache(struct replay_opts *opts)
        refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, NULL, NULL, NULL);
        if (the_index.cache_changed && index_fd >= 0) {
                if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK)) {
-                       rollback_lock_file(&index_lock);
                        return error(_("git %s: failed to refresh the index"),
                                _(action_name(opts)));
                }