diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-06 18:09:03 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-06 18:09:03 +0100 |
commit | 0175b6e2b9f99101b37cd4b1aa61711678a17105 (patch) | |
tree | f9e302f409b71729c0137109f2cd44c4901df32a | |
parent | Merge branch 'rs/apply-inaccurate-eof-with-incomplete-line' into maint (diff) | |
parent | sequencer: reschedule pick if index can't be locked (diff) | |
download | git-0175b6e2b9f99101b37cd4b1aa61711678a17105.tar.xz git-0175b6e2b9f99101b37cd4b1aa61711678a17105.zip |
Merge branch 'pw/sequencer-recover-from-unlockable-index' into maint
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
-rw-r--r-- | sequencer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index 2882d53120..5e09b5d34f 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(); |