SVN.pm::parse_svn_date: allow timestamps with a single-digit hour
Some broken subversion server gives timestamps with only one digit in the hour part, like this: 2014-01-07T5:01:02.048176Z Loosen the regexp that expected to see two-digit hour, minute and second parts to accept a single-digit hour (but not minute or second). Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
RomanBelinsky committed
Feb 11, 2014 at 18:23 UTC
784f4b6f33afb439a3d95e5751731a88df545889
1 file changed
+1
-1
perl/Git/SVN.pm
+1
-1
@@ -1321,7 +1321,7 @@ sub get_untracked {
1321
sub parse_svn_date {
1322
my $date = shift || return '+0000 1970-01-01 00:00:00';
1323
my ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\d{4})\-(\d\d)\-(\d\d)T
1324
- (\d\d)\:(\d\d)\:(\d\d)\.\d*Z$/x) or
1324
+ (\d\d?)\:(\d\d)\:(\d\d)\.\d*Z$/x) or
1325
croak "Unable to parse date: $date\n";
1326
my $parsed_date; # Set next.
1327