diff options
author | Vincent Ambo <mail@tazj.in> | 2020-11-21T18·20+0100 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2020-11-21T18·45+0100 |
commit | f4609b896fac842433bd495c166d5987852a6a73 (patch) | |
tree | 95511c465c54c4f5d27e5d39ce187e2a1dd82bd3 /third_party/git/git-cvsimport.perl | |
parent | 082c006c04343a78d87b6c6ab3608c25d6213c3f (diff) |
merge(3p/git): Merge git subtree at v2.29.2 r/1890
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
Diffstat (limited to 'third_party/git/git-cvsimport.perl')
-rwxr-xr-x | third_party/git/git-cvsimport.perl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/git/git-cvsimport.perl b/third_party/git/git-cvsimport.perl index b31613cb8aa8..7bf3c12d6789 100755 --- a/third_party/git/git-cvsimport.perl +++ b/third_party/git/git-cvsimport.perl @@ -600,7 +600,7 @@ my $cvs = CVSconn->new($opt_d, $cvs_tree); sub pdate($) { my ($d) = @_; m#(\d{2,4})/(\d\d)/(\d\d)\s(\d\d):(\d\d)(?::(\d\d))?# - or die "Unparseable date: $d\n"; + or die "Unparsable date: $d\n"; my $y=$1; $y+=100 if $y<70; $y+=1900 if $y<1000; @@ -637,9 +637,9 @@ sub getwd() { return $pwd; } -sub is_sha1 { +sub is_oid { my $s = shift; - return $s =~ /^[a-f0-9]{40}$/; + return $s =~ /^[a-f0-9]{40}(?:[a-f0-9]{24})?$/; } sub get_headref ($) { @@ -810,7 +810,7 @@ sub write_tree () { open(my $fh, '-|', qw(git write-tree)) or die "unable to open git write-tree: $!"; chomp(my $tree = <$fh>); - is_sha1($tree) + is_oid($tree) or die "Cannot get tree id ($tree): $!"; close($fh) or die "Error running git write-tree: $?\n"; @@ -896,7 +896,7 @@ sub commit { print "Committed patch $patchset ($branch $commit_date)\n" if $opt_v; chomp(my $cid = <$commit_read>); - is_sha1($cid) or die "Cannot get commit id ($cid): $!\n"; + is_oid($cid) or die "Cannot get commit id ($cid): $!\n"; print "Commit ID $cid\n" if $opt_v; close($commit_read); |