Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include cache.h #include builtin.h +#include tempfile.h #include lockfile.h #include dir.h #include

Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Michael Haggerty
On 06/10/2015 07:36 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include cache.h #include builtin.h +#include tempfile.h

Re: [PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-10 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 06/10/2015 07:36 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: diff --git a/builtin/add.c b/builtin/add.c index df5135b..aaa9ce4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -5,6 +5,7 @@ */ #include

[PATCH 02/14] tempfile: a new module for handling temporary files

2015-06-08 Thread Michael Haggerty
A lot of work went into defining the state diagram for lockfiles and ensuring correct, race-resistant cleanup in all circumstances. Most of that infrastructure can be applied directly to *any* temporary file. So extract a new tempfile module from the lockfile module. Reimplement lockfile on top