Git.pm: Use File::Temp->tempfile instead of ->new
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> Acked-by: Eric Wong <normalperson@yhbt.net> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
1e368681bd
commit
836ff95df6
@ -3284,7 +3284,7 @@ sub close_file {
|
||||
my $out = syswrite($tmp_fh, $str, $res);
|
||||
defined($out) && $out == $res
|
||||
or croak("write ",
|
||||
$tmp_fh->filename,
|
||||
Git::temp_path($tmp_fh),
|
||||
": $!\n");
|
||||
}
|
||||
defined $res or croak $!;
|
||||
@ -3295,7 +3295,7 @@ sub close_file {
|
||||
}
|
||||
|
||||
$hash = $::_repository->hash_and_insert_object(
|
||||
$fh->filename);
|
||||
Git::temp_path($fh));
|
||||
$hash =~ /^[a-f\d]{40}$/ or die "not a sha1: $hash\n";
|
||||
|
||||
Git::temp_release($fb->{base}, 1);
|
||||
|
Reference in New Issue
Block a user