Subject: Re: [PATCH v6 02/39] api-lockfile: revise and expand the documentation

From: Michael Haggerty <[email-masked]>
Date: Wed, 01 Oct 2014 10:11:36 +0200

On 09/30/2014 07:47 PM, Junio C Hamano wrote:
> Jeff King <[email-masked]> writes:
> 
>> On Tue, Sep 30, 2014 at 03:41:55PM +0200, Michael Haggerty wrote:
>>
>>> I didn't fix it because IMO the correct fix is to add a stdio-oriented
>>> entry point to the lockfile API, and teach the lockfile code to handle
>>> closing the FILE correctly when necessary.
>>
>> I think so, too, after our discussion[1] surrounding 9540ce5 (refs: write
>> packed_refs file using stdio, 2014-09-10).
> 
> Yeah, but we already write packed-refs via stdio, so the stdio
> oriented lockfile API entry points can no longer be just on the
> mythical todo list but needs to become reality before we can merge
> this topic sanely.

That's not the fault of this topic, which just moves the text of the
"rule" to a different place in the file. And neither is it the fault of
Peff's change to write packed-refs via stdio. It is the fault of

  60b9004 Use atomic updates to the fast-import mark file (2007-03-08)

which also fdopen()ed then fclose()d a lock_file::fd, and of

  0c0478c Document lockfile API (2008-01-16)

which documented the "rule" that had already been broken.

>>> But I didn't want to add even more changes to this patch series, so I am
>>> working on this as a separate patch series. I hope to submit it soon.
>>
>> Yay.
> 
> Yay.

Michael

-- 
Michael Haggerty
[email-masked]