diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-27 11:06:35 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-27 11:06:35 +0900 |
commit | c2ed68342b8247d99fa1204872984ce9817fbaae (patch) | |
tree | 583b53d27f5aaaf9a027bfb4f730ede64a249b11 /sequencer.c | |
parent | Merge branch 'sd/branch-copy' (diff) | |
parent | sequencer: reschedule pick if index can't be locked (diff) | |
download | tgif-c2ed68342b8247d99fa1204872984ce9817fbaae.tar.xz |
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
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index 19dd575ed9..fa94ed652d 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(); |