Re: [PATCH v2] Git.pm: Use File::Temp->tempfile instead of ->new
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Sep 10, 2008, 10:09 UTC
- Message-ID
- <20080910100958.GE13085@hand.yhbt.net>
- In-Reply-To
- <7vwshkzmfv.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 32 quoted lines
> Eric Wong <normalperson@yhbt.net> writes: > > > Marcus Griep <marcus@griep.us> wrote: > >> Perl 5.8.0 ships with File::Temp 0.13, which does not have the new() > >> interface introduced in 0.14, as pointed out by Tom G. Christensen. > >> > >> This modifies Git.pm to use the more established tempfile() interface > >> and updates 'git svn' to match. > >> > >> Signed-off-by: Marcus Griep <marcus@griep.us> > >> --- > >> > >> This patch v2 cleans up a few code items, corrects a misspelling, > >> and ensures that the temp file gets unlinked when we exit, now > >> that we are requesting the filename. Otherwise, the previous > >> comments stand: > >> > >> Per the earlier patch versions by Abhijit Menon-Sen and Tom G. Christensen. > >> Both of you may want to run a test and add your 'Tested-by' to the thread > >> if everything works out before Eric Wong adds his 'Acked-by'. > > > > Thanks Marcus, this works for me. > > (Perl 5.10.0, so no compatibility issues). > > > > <bikeshed> > > Can we rename temp_fname() to temp_path(), though? "fname" > > just doesn't look right in the API to me... > > </bikeshed> > > Ok, so will you take the patch with bikeshed fixes and feed the result to > me with a pull-request, or shall I do that myself? I do not mind doing > this either way --- just trying to avoid duplicated work.
Please do it for me, thanks. I've been preoccuppied offline and need sleep.
> This is a 'maint' material, right?
Yes, definitely.
-- Eric Wong