mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
sequencer: always roll back lock in do_recursive_merge()
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
14bca6c63c
commit
6481652432
@ -514,8 +514,10 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
|
||||
fputs(o.obuf.buf, stdout);
|
||||
strbuf_release(&o.obuf);
|
||||
diff_warn_rename_limit("merge.renamelimit", o.needed_rename_limit, 0);
|
||||
if (clean < 0)
|
||||
if (clean < 0) {
|
||||
rollback_lock_file(&index_lock);
|
||||
return clean;
|
||||
}
|
||||
|
||||
if (active_cache_changed &&
|
||||
write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
|
||||
|
Loading…
Reference in New Issue
Block a user