[PATCH v2' 12/16] diff: use tempfile module

2015-08-12 Thread Michael Haggerty
Also add some code comments explaining how the fields in "struct diff_tempfile" are used. Signed-off-by: Michael Haggerty --- This is a replacement for tempfile patch v2 12/16 that includes some extra code comments. It is also available from my GitHub repo [1] on branch "tempfile". [1] https://g

Re: [PATCH v2 12/16] diff: use tempfile module

2015-08-12 Thread Junio C Hamano
Michael Haggerty writes: > No, prepare_temp_file() sometimes sets diff_tempfile::name to > "/dev/null", and sometimes to point at its argument `name`. That explains everything. Thanks. It's been a while since I wrote this part of the system ;-). -- To unsubscribe from this list: send the line

Re: [PATCH v2 12/16] diff: use tempfile module

2015-08-12 Thread Michael Haggerty
On 08/11/2015 10:03 PM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Signed-off-by: Michael Haggerty >> --- >> diff.c | 29 +++-- >> 1 file changed, 7 insertions(+), 22 deletions(-) > > Nice code reduction. > >> diff --git a/diff.c b/diff.c >> index 7500c55..d

Re: [PATCH v2 12/16] diff: use tempfile module

2015-08-11 Thread Junio C Hamano
Michael Haggerty writes: > Signed-off-by: Michael Haggerty > --- > diff.c | 29 +++-- > 1 file changed, 7 insertions(+), 22 deletions(-) Nice code reduction. > diff --git a/diff.c b/diff.c > index 7500c55..dc95247 100644 > --- a/diff.c > +++ b/diff.c > @@ -2,6 +2,7 @@

[PATCH v2 12/16] diff: use tempfile module

2015-08-10 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- diff.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/diff.c b/diff.c index 7500c55..dc95247 100644 --- a/diff.c +++ b/diff.c @@ -2,6 +2,7 @@ * Copyright (C) 2005 Junio C Hamano */ #include "cache.h" +#in