summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df5d10a)
raw | patch | inline | side by side (parent: df5d10a)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Feb 2009 18:48:01 +0000 (10:48 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Feb 2009 18:48:01 +0000 (10:48 -0800) |
Ward Wouts reports that git-svn barfed like this:
Unable to parse date: 2004-03-09T09:44:33.Z at /usr/bin/git-svn line 3995
The parse_svn_date sub expects there always are one or more digits after
the decimal point to record fractional seconds, but this example does not
and results in a failure like this.
The fix is based on the original fix by the reporter, further cleaned up.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Unable to parse date: 2004-03-09T09:44:33.Z at /usr/bin/git-svn line 3995
The parse_svn_date sub expects there always are one or more digits after
the decimal point to record fractional seconds, but this example does not
and results in a failure like this.
The fix is based on the original fix by the reporter, further cleaned up.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 83cb36f0655c0809bb60f1efad78f66ac8de1378..cbc5211d58a37f71b5c4566b9375ee398a1612ba 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
sub parse_svn_date {
my $date = shift || return '+0000 1970-01-01 00:00:00';
my ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\d{4})\-(\d\d)\-(\d\d)T
- (\d\d)\:(\d\d)\:(\d\d).\d+Z$/x) or
+ (\d\d)\:(\d\d)\:(\d\d)\.\d*Z$/x) or
croak "Unable to parse date: $date\n";
my $parsed_date; # Set next.