diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2017-11-15 10:41:25 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-16 14:19:12 +0900 |
commit | bd58886775de24ce3a330775a35c3c2e868967ee (patch) | |
tree | 0e03764c0e51299afaccbf1cf0946f232d788e4f | |
parent | 5a1f5c3060427375de30d609d72ac032516be4c2 (diff) | |
download | git-bd58886775de24ce3a330775a35c3c2e868967ee.tar.gz |
sequencer: reschedule pick if index can't be lockedpw/sequencer-recover-from-unlockable-index
If the index cannot be locked in do_recursive_merge(), issue an
error message and go on to the error recovery codepath, instead of
dying. When the commit cannot be picked, it needs to be rescheduled
when performing an interactive rebase, but just dying there won't
allow that to happen, and when the user runs 'git rebase --continue'
rather than 'git rebase --abort', the commit gets silently dropped.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
-rw-r--r-- | sequencer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index 332a383b03..10924ffd49 100644 --- a/sequencer.c +++ b/sequencer.c @@ -438,7 +438,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next, char **xopt; static struct lock_file index_lock; - hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR); + if (hold_locked_index(&index_lock, LOCK_REPORT_ON_ERROR) < 0) + return -1; read_cache(); |