Subject: Re: [PATCH 00/14] Introduce a tempfile module

From: Junio C Hamano <[email-masked]>
Date: Wed, 10 Jun 2015 11:34:16 -0700

Michael Haggerty <[email-masked]> writes:

> These patches are also available from my GitHub repo [2], branch
> "tempfile".

Overall the series made a lot of sense.

On a few points I raised:

 - I still think that exposing the implementation detail of the
   lockfile API that it builds on tempfile API is going backwards.
   I wonder if a few helper functions added to the lockfile
   API to hide it, e.g. instead of letting the caller say
   "lk->tempfile.fd", have them call "lockfile_fd(lk)", would make
   things even more clean.

 - The tempfile API could be built on yet another layer of
   clean_on_exit_file API to unconfuse me on "register_tempfile()",
   but I do not think it is worth it only for two existing callers
   (gc and credential).

Thanks.