Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sequencer: always roll back lock in `do_recursive_merge()`
author
Martin Ågren
<martin.agren@gmail.com>
Tue, 27 Feb 2018 21:30:10 +0000
(22:30 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Feb 2018 22:48:17 +0000
(14:48 -0800)
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>
sequencer.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
14bca6c
)
diff --git
a/sequencer.c
b/sequencer.c
index d9f865926d8d4c772877c271fb40e81d737eff3e..bca692282306c414b6f3e59bcfb57a7c5c339040 100644
(file)
--- a/
sequencer.c
+++ b/
sequencer.c
@@
-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))