Re: [PATCH v2 14/14] git-cvsexportcommit: port to SHA-256
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Aug 4, 2020, 00:44 UTC
- Message-ID
- <20200804004423.GO6540@camp.crustytoothpaste.net>
- In-Reply-To
- <20200804001315.GA4899@dcvr>
On 2020-08-04 at 00:13:26, Eric Wong wrote:
Show 21 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> wrote:
> > On 2020-08-03 at 18:37:27, Andreas Schwab wrote:
> > > On Jun 22 2020, brian m. carlson wrote:
> > >
> > > > diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
> > > > index fc00d5946a..6483d792d3 100755
> > > > --- a/git-cvsexportcommit.perl
> > > > +++ b/git-cvsexportcommit.perl
> > > > @@ -22,6 +22,10 @@
> > > > my $repo = Git->repository();
> > > > $opt_w = $repo->config('cvsexportcommit.cvsdir') unless defined $opt_w;
> > > >
> > > > +my $tmpdir = File::Temp->newdir;
> > >
> > > File::Temp in perl 5.10 doesn't have the newdir method.
> >
> > That method was added in File::Temp 0.19, which was added in 2007. Does
>
> 5.10.0 doesn't have ->newdir, but 5.10.1 does. I figure nobody
> used 5.10.0 anymore since 5.10.1 exists and (IIRC) fixed many
> things wrong in 5.10.0.Technically we support 5.8.8, I believe, which means this probably does need to be fixed. I'll let Andreas verify the proposed solution works for him, and then send a patch.
Show 9 quoted lines
> > For the record, I plan to propose that we drop support for Perl versions > > earlier than 5.14 on December 2, since CentOS 6 will be dead at that > > point. I think a ten-year lifespan for an OS is quite generous and > > we're still considering Perl 5.8.8, which nobody is publicly supporting > > anymore. > > That's probably fine. I haven't looked at 5.12 and 5.14 changes > enough to comment, but just moving rom 5.8 to 5.10.1 last year > made my life considerably better (e.g. `//', `//=')
5.14 has nice things like s///r:
# 5.12 # We have to make a copy since s/// modifies its left side. my $foo = $ARGV[0]; $foo =~ s/a/b/;
# 5.14 # Now we have non-destructive substitution. my $foo = $ARGV[0] =~ s/a/b/r;
-- brian m. carlson: Houston, Texas, US