From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] sequencer: reschedule pick if index can't be locked
Date: Wed, 15 Nov 2017 23:03:45 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1711152301510.6482@virtualbox> (raw)
In-Reply-To: <20171115104125.1686-1-phillip.wood@talktalk.net>
Hi Phillip,
On Wed, 15 Nov 2017, Phillip Wood wrote:
> 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
next prev parent reply other threads:[~2017-11-15 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2017-11-16 5:22 ` [PATCH v2] " Junio C Hamano
2017-11-16 14:19 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1.1711152301510.6482@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).