Skip to content

Commit c2ed683

Browse files
committed
Merge branch 'pw/sequencer-recover-from-unlockable-index'
The sequencer machinery (used by "git cherry-pick A..B", and "git rebase -i", among other things) would have lost a commit if stopped due to an unlockable index file, which has been fixed. * pw/sequencer-recover-from-unlockable-index: sequencer: reschedule pick if index can't be locked
2 parents 6254330 + bd58886 commit c2ed683

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sequencer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
438438
char **xopt;
439439
static struct lock_file index_lock;
440440

441-
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
441+
if (hold_locked_index(&index_lock, LOCK_REPORT_ON_ERROR) < 0)
442+
return -1;
442443

443444
read_cache();
444445

0 commit comments

Comments
 (0)