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

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 15, 2017, 22:03 UTC
Message-ID
<alpine.DEB.2.21.1.1711152301510.6482@virtualbox>
In-Reply-To
<20171115104125.1686-1-phillip.wood@talktalk.net>
Hi Phillip,
On Wed, 15 Nov 2017, Phillip Wood wrote:
Show 10 quoted lines
> 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))

If you test the return value for *negative* values, I am fully on board with the change.

As far as I understand the code, hold_locked_index() returns -1 on error, but *a file descriptor* (which is usually not 0) upon success...

Ciao, Dscho

Previous: Martin ÅgrenNext: Junio C Hamano
Message 5 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.