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 <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Eric Wong committed
Dec 11, 2006 at 20:25 UTC
359850041e8158f6aeb70ad611ef1ba8834b8349
1 file changed
+2
-1
git-svn.perl
+2
-1
@@ -2981,7 +2981,8 @@ sub libsvn_log_entry {
2981
my ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\d{4})\-(\d\d)\-(\d\d)T
2982
(\d\d)\:(\d\d)\:(\d\d).\d+Z$/x)
2983
or die "Unable to parse date: $date\n";
2984
- if (defined $_authors && ! defined $users{$author}) {
2984
+ if (defined $author && length $author > 0 &&
2985
+ defined $_authors && ! defined $users{$author}) {
2986
die "Author: $author not defined in $_authors file\n";
2987
}
2988
$msg = '' if ($rev == 0 && !defined $msg);