diff options
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-x | git-cvsimport.perl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 1e4e65a45d..b31613cb8a 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -601,7 +601,9 @@ 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"; - my $y=$1; $y-=1900 if $y>1900; + my $y=$1; + $y+=100 if $y<70; + $y+=1900 if $y<1000; return timegm($6||0,$5,$4,$3,$2-1,$y); } @@ -642,6 +644,7 @@ sub is_sha1 { sub get_headref ($) { my $name = shift; + $name =~ s/'/'\\''/g; my $r = `git rev-parse --verify '$name' 2>/dev/null`; return undef unless $? == 0; chomp $r; |