git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sequencer: reschedule pick if index can't be locked
@ 2017-11-15 10:41 Phillip Wood
  2017-11-15 18:44 ` Martin Ågren
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Phillip Wood @ 2017-11-15 10:41 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Johannes Schindelin, Phillip Wood

From: Phillip Wood <phillip.wood@dunelm.org.uk>

Return an error instead of dying if the index cannot be locked in
do_recursive_merge() as if the commit cannot be picked it needs to be
rescheduled when performing an interactive rebase. If the pick is not
rescheduled and the user runs 'git rebase --continue' rather than 'git
rebase --abort' then the commit gets silently dropped.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index 6d027b06c8d8dc69b14d05752637a65aa121ab24..8c10442b84068d3fb7ec809ef1faa0203cb83e60 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))
+		return -1;
 
 	read_cache();
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-16 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 10:41 [PATCH] sequencer: reschedule pick if index can't be locked Phillip Wood
2017-11-15 18:44 ` Martin Ågren
2017-11-16 10:43   ` Phillip Wood
2017-11-16 10:55     ` Martin Ågren
2017-11-15 22:03 ` Johannes Schindelin
2017-11-16  5:22 ` [PATCH v2] " Junio C Hamano
2017-11-16 14:19   ` Phillip Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).