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

Reply via email to