Paul Tan writes:
> Hmm, to add on, looking at the three other call sites of this
> function, two of them (builtin/commit.c and builtin/describe.c)
> basically do:
>
> if (0 <= fd)
> update_index_if_able(...)
>
> with that 0 <= fd conditional. With this patch it becomes three out of
>
Hi Junio,
On Thu, Dec 8, 2016 at 4:48 AM, Stefan Beller wrote:
> On Wed, Dec 7, 2016 at 11:41 AM, Junio C Hamano wrote:
>> The require_clean_work_tree() function calls hold_locked_index()
>> with die_on_error=0 to signal that it is OK if it fails to obtain
>> the lock, but unconditionally calls
On Wed, Dec 7, 2016 at 1:08 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> So my first question I had to answer was if we do the right thing here,
>> i.e. if we could just fail instead. But we want to continue and just
>> not write back the index, which is fine.
>>
>> So we do not have to
Stefan Beller writes:
> So my first question I had to answer was if we do the right thing here,
> i.e. if we could just fail instead. But we want to continue and just
> not write back the index, which is fine.
>
> So we do not have to guard refresh_cache, but just call
> update_index_if_able cond
On Wed, Dec 7, 2016 at 11:41 AM, Junio C Hamano wrote:
> The require_clean_work_tree() function calls hold_locked_index()
> with die_on_error=0 to signal that it is OK if it fails to obtain
> the lock, but unconditionally calls update_index_if_able(), which
> will try to write into fd=-1.
>
> Sign
On Wed, Dec 7, 2016 at 12:53 PM, Junio C Hamano wrote:
> On Wed, Dec 7, 2016 at 12:48 PM, Stefan Beller wrote:
>>
>> So I would expect that we'd rather fix the update_index_if_able instead by
>> checking for the lockfile to be in the correct state?
>
> I actually don't expect that, after looking
On Wed, Dec 7, 2016 at 12:48 PM, Stefan Beller wrote:
>
> So I would expect that we'd rather fix the update_index_if_able instead by
> checking for the lockfile to be in the correct state?
I actually don't expect that, after looking at other call sites of
that function.
The require_clean_work_tree() function calls hold_locked_index()
with die_on_error=0 to signal that it is OK if it fails to obtain
the lock, but unconditionally calls update_index_if_able(), which
will try to write into fd=-1.
Signed-off-by: Junio C Hamano
---
wt-status.c | 7 ---
1 file cha
8 matches
Mail list logo