From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 2AE691F990 for ; Thu, 6 Aug 2020 00:17:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726197AbgHFARH (ORCPT ); Wed, 5 Aug 2020 20:17:07 -0400 Received: from injection.crustytoothpaste.net ([192.241.140.119]:41356 "EHLO injection.crustytoothpaste.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgHFARA (ORCPT ); Wed, 5 Aug 2020 20:17:00 -0400 Received: from camp.crustytoothpaste.net (unknown [IPv6:2001:470:b978:101:b610:a2f0:36c1:12e3]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by injection.crustytoothpaste.net (Postfix) with ESMTPSA id 177BB60799; Thu, 6 Aug 2020 00:16:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1596673017; bh=JZHCMU8v4sQbpU2AoyP9vZkPmgsVSdgY9svnGfXDf8I=; h=From:To:Cc:Subject:Date:From:Reply-To:Subject:Date:To:CC: Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References: Content-Type:Content-Disposition; b=kCr5N0D1gJc+unBugBGykYZ59wBiYlGp686nFHs/HYHnjHTh5NG0QnCsccApTQDdl rumMjqf8UuNuqUCg9q1pBduh9YIQ59lvMzanpigec1ygCphYx4ersxlK0apbQBsoUH Abpsfv6riICr+/Lrdko7a8yFeaVTGnLMX594HGNOvmwPhDqBNTyRILzWgVvm0Tqbbn sZH98sQRQj/YBkJGpG7OnLAbOgJgO/Ea7zQJ80G3ZPFo3alpHXfyrDmdaoZF/5iqw7 EcAWU7IxRMV2TuCOqDvyRrZMy3P719IR8zer2ouYw8aW/q52Iks/2IYey5Wqrz5o1x AEF2zEi5Bj9Llc44BHp93c9vLWvgH1yv1toBViRJHSlSK4gJHzTqKgfYUOw5bK0r/7 1UPZ1ijtR6/nAAMW63cGKw7ecL8kord2iejcoQuuidvr4ArRT7wi+rlB99L9Ndt/nT Xd0jT+4nRV6eRRog3AIJyzORjgBCs3crlP2Tolyg3NZVUkhLriY From: "brian m. carlson" To: Cc: Andreas Schwab , Eric Wong Subject: [PATCH] git-cvsexportcommit: support Perl before 5.10.1 Date: Thu, 6 Aug 2020 00:16:50 +0000 Message-Id: <20200806001650.3939903-1-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.28.0.163.g6104cc2f0b6 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The change in 6e9c4d408d ("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 --- git-cvsexportcommit.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index 6483d792d3..0ae8bce3fb 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -22,7 +22,7 @@ my $repo = Git->repository(); $opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w; -my $tmpdir = File::Temp->newdir; +my $tmpdir = File::Temp::tempdir(CLEANUP => 1); my $hash_algo = $repo->config('extensions.objectformat') || 'sha1'; my $hexsz = $hash_algo eq 'sha256' ? 64 : 40;