From: Junio C Hamano <gitster@pobox.com>
To: Stepan Kasal <kasal@ucw.cz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Update SVN.pm
Date: Wed, 16 Apr 2014 12:13:21 -0700 [thread overview]
Message-ID: <xmqq61m9gka6.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140416141605.GA9692@camelia.ucw.cz> (Stepan Kasal's message of "Wed, 16 Apr 2014 16:16:05 +0200")
Stepan Kasal <kasal@ucw.cz> writes:
> From: RomanBelinsky <belinsky.roman@gmail.com>
> Date: Tue, 11 Feb 2014 18:23:02 +0200
>
> fix parsing error for dates like:
> 2014-01-07T5:58:36.048176Z
> previous regex can parse only:
> 2014-01-07T05:58:36.048176Z
> reproduced in my svn repository during conversion.
Interesting. What other strange forms can they record in their
repositories, I have to wonder. Can they do
2014-01-07T5:8:6.048176Z
for example? I am wondering if it is simpler and less error prone
to turn all these "we only accept two digits" into "\d+" not only
for the hour part but also minute and second parts.
> Signed-off-by: Stepan Kasal <kasal@ucw.cz>
> ---
> perl/Git/SVN.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
> index a59564f..09cff13 100644
> --- a/perl/Git/SVN.pm
> +++ b/perl/Git/SVN.pm
> @@ -1321,7 +1321,7 @@ sub get_untracked {
> 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.
next prev parent reply other threads:[~2014-04-16 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 14:16 [PATCH] Update SVN.pm Stepan Kasal
2014-04-16 19:13 ` Junio C Hamano [this message]
2014-04-17 5:24 ` Stepan Kasal
2014-04-17 17:39 ` Junio C Hamano
2014-04-18 6:48 ` Stepan Kasal
2014-04-17 18:01 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq61m9gka6.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kasal@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.