git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fixes an 'Unable to parse date' error message in git-svn

From
WWWard Wouts <ward@wouts.nl>
Date
Feb 17, 2009, 15:16 UTC
Message-ID
<20090217151625.GR7504@wouts.nl>

I got the following error message while trying to fetch a subversion repository:

$ git svn init file:///home/mg/svn/mg git-svn-test Initialized empty Git repository in /home/ward/worktrees/git-svn-test/.git/ $ cd git-svn-test $ git svn fetch

r59 = c20f5b6c61bb8b2babc1b3644b6372e023d9d428 (git-svn)
W: +empty_dir: CFE
r60 = 1b8ad7c39dd60897319545c9f3f08b3b2b82b863 (git-svn)
        A       CFE/Makefile
Unable to parse date: 2004-03-09T09:44:33.Z
 at /usr/bin/git-svn line 3995

This patch makes the matching of subseconds optional, which prevents the error message from showing. Since the subseconds match isn't actually used this should not be a problem.

Signed-off-by: Ward Wouts <ward@wouts.nl>
Acked-by: Deskin Miller <deskinm@umich.edu>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 83cb36f..8ffadcc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2526,7 +2526,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.
 
-- 
1.5.6.6
Message 1 of 1 in “Fixes an 'Unable to parse date' error message in git-svn”
  1. Fixes an 'Unable to parse date' error message in git-svnWard Wouts, Feb 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.