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

2014-10-01 Thread Michael Haggerty
On 09/30/2014 07:47 PM, Junio C Hamano wrote: > Jeff King 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 >>> clo

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

2014-10-01 Thread Michael Haggerty
On 09/30/2014 07:39 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> I was being repetitive because I didn't want the docs to depend on the >> user remembering what the "bss" section is (which, technically, is also >> not part of the C standard). I think a better way would be to just not

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

2014-09-30 Thread Junio C Hamano
Jeff King 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,

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

2014-09-30 Thread Junio C Hamano
Michael Haggerty writes: > I was being repetitive because I didn't want the docs to depend on the > user remembering what the "bss" section is (which, technically, is also > not part of the C standard). I think a better way would be to just not > mention "bss section" at all and reword the rest.

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

2014-09-30 Thread Jeff King
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]

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

2014-09-30 Thread Michael Haggerty
On 09/26/2014 10:40 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> +If you need to close the file descriptor you obtained from a >> +`hold_lock_file_*` function yourself, do so by calling >> +`close_lock_file`. You should never call `close(2)` yourself! > > This is sometimes untenable

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

2014-09-30 Thread Michael Haggerty
On 09/26/2014 08:33 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Document a couple more functions and the flags argument as used by >> hold_lock_file_for_update() and hold_lock_file_for_append(). >> Reorganize the document to make it more accessible. >> >> Helped-by: Jonathan Nieder

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

2014-09-26 Thread Junio C Hamano
Michael Haggerty writes: > +If you need to close the file descriptor you obtained from a > +`hold_lock_file_*` function yourself, do so by calling > +`close_lock_file`. You should never call `close(2)` yourself! This is sometimes untenable, isn't it? A caller may want to freopen(3) a stream on

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

2014-09-26 Thread Junio C Hamano
Michael Haggerty writes: > Document a couple more functions and the flags argument as used by > hold_lock_file_for_update() and hold_lock_file_for_append(). > Reorganize the document to make it more accessible. > > Helped-by: Jonathan Nieder > Signed-off-by: Michael Haggerty > --- > Documentat

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

2014-09-26 Thread Michael Haggerty
Document a couple more functions and the flags argument as used by hold_lock_file_for_update() and hold_lock_file_for_append(). Reorganize the document to make it more accessible. Helped-by: Jonathan Nieder Signed-off-by: Michael Haggerty --- Documentation/technical/api-lockfile.txt | 199 +