Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d574dd2

Browse files
kain64kasal
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e9a108 commit d574dd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

perl/Git/SVN.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ sub get_untracked {
13211321
sub parse_svn_date {
13221322
my $date = shift || return '+0000 1970-01-01 00:00:00';
13231323
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
13251325
croak "Unable to parse date: $date\n";
13261326
my $parsed_date; # Set next.
13271327

0 commit comments

Comments
 (0)