Skip to content

Commit 6103d58

Browse files
bk2204gitster
authored andcommitted
git-cvsexportcommit: support Perl before 5.10.1
The change in 6e9c4d4 ("git-cvsexportcommit: port to SHA-256", 2020-06-22) added the use of a temporary directory for the index. However, the form we used doesn't work in versions of Perl before 5.10.1. For example, version 5.10.0 contains a version of File::Temp from 2007 that doesn't contain "newdir". In order to make the code work with 5.8.8, which we support, let's change to use the static method "tempdir" with the argument "CLEANUP", which provides the same behavior. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6e9c4d4 commit 6103d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-cvsexportcommit.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
my $repo = Git->repository();
2323
$opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;
2424

25-
my $tmpdir = File::Temp->newdir;
25+
my $tmpdir = File::Temp::tempdir(CLEANUP => 1);
2626
my $hash_algo = $repo->config('extensions.objectformat') || 'sha1';
2727
my $hexsz = $hash_algo eq 'sha256' ? 64 : 40;
2828

0 commit comments

Comments
 (0)