From: Eric Wong Date: Tue, 12 Dec 2006 04:25:58 +0000 (-0800) Subject: git-svn: correctly handle "(no author)" when using an authors file X-Git-Tag: v1.5.0-rc0~117 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=359850041e8158f6aeb70ad611ef1ba8834b8349;p=git.git git-svn: correctly handle "(no author)" when using an authors file The low-level parts of the SVN library return NULL/undef for author-less revisions, whereas "(no author)" is a (svn) client convention. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/git-svn.perl b/git-svn.perl index 15254e479..ec92b440b 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2981,7 +2981,8 @@ sub libsvn_log_entry { 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 die "Unable to parse date: $date\n"; - if (defined $_authors && ! defined $users{$author}) { + if (defined $author && length $author > 0 && + defined $_authors && ! defined $users{$author}) { die "Author: $author not defined in $_authors file\n"; } $msg = '' if ($rev == 0 && !defined $msg);