git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] sequencer: reschedule pick if index can't be locked

From
PWPhillip Wood <phillip.wood@talktalk.net>
Date
Nov 16, 2017, 14:19 UTC
Message-ID
<b2ea8018-7afc-46fa-381d-5c471a438fe5@talktalk.net>
In-Reply-To
<xmqqshdex0ff.fsf@gitster.mtv.corp.google.com>
On 16/11/17 05:22, Junio C Hamano wrote:
Show 14 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
> Date: Wed, 15 Nov 2017 10:41:25 +0000
> 
> 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>
> ---
> 
>  * I've queue this, taking input from responses by Dscho and Martin.
That's great thanks, sorry for the bug in the original
Best Wishes
Phillip
Show 18 quoted lines
>  sequencer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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();
>  
> 
Previous: Junio C Hamano
Message 7 of 7 in “sequencer: reschedule pick if index can't be locked”
  1. sequencer: reschedule pick if index can't be lockedPhillip Wood, Nov 15, 2017
  2. Martin ÅgrenNov 15, 2017
  3. Phillip WoodNov 16, 2017
  4. Martin ÅgrenNov 16, 2017
  5. Johannes SchindelinNov 15, 2017
  6. sequencer: reschedule pick if index can't be lockedJunio C Hamano, Nov 16, 2017
  7. Phillip WoodNov 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.