{"thread":{"id":"53995","subject":"[PATCH] git-cvsexportcommit: support Perl before 5.10.1","startedAt":"2020-08-06T00:17:09Z","lastAt":"2020-08-06T00:17:09Z","messageCount":1,"participants":["brian m. carlson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"403011","messageId":"20200806001650.3939903-1-sandals@crustytoothpaste.net","threadId":"53995","inReplyTo":null,"subject":"[PATCH] git-cvsexportcommit: support Perl before 5.10.1","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-08-06T00:16:50Z","receivedAt":"2020-08-06T00:17:09Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"The change in 6e9c4d408d (\"git-cvsexportcommit: port to SHA-256\",\n2020-06-22) added the use of a temporary directory for the index.\nHowever, the form we used doesn't work in versions of Perl before\n5.10.1.  For example, version 5.10.0 contains a version of File::Temp\nfrom 2007 that doesn't contain \"newdir\".\n\nIn order to make the code work with 5.8.8, which we support, let's\nchange to use the static method \"tempdir\" with the argument \"CLEANUP\",\nwhich provides the same behavior.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n git-cvsexportcommit.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex 6483d792d3..0ae8bce3fb 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -22,7 +22,7 @@\n my $repo = Git->repository();\n $opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;\n \n-my $tmpdir = File::Temp->newdir;\n+my $tmpdir = File::Temp::tempdir(CLEANUP => 1);\n my $hash_algo = $repo->config('extensions.objectformat') || 'sha1';\n my $hexsz = $hash_algo eq 'sha256' ? 64 : 40;\n \n"}]}