@matheusbsbs / matheus-bagliano / commits / 9231f500c3
Fork 0

git-svn bug with blank commits and author file

When trying to import from svn using an author file, git-svn bails out if it encounters a blank author. The attached patch changes this behavior and allow using the author file with blanks authors. I came across this bug while importing from a cvs2svn repo where the initial revision (1) has a blank author. This doesn't break the behavior of bailing out when an unknown author is encountered. Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Guyot-Sionnest committed Apr 22, 2008 at 06:07 UTC 9231f500c394ede405fcfdca151dd7758ce99ced
1 file changed +1 -2
git-svn.perl
+1 -2
@@ -2363,8 +2363,7 @@ sub check_author {
2363 my ($author) = @_;
2364 if (!defined $author || length $author == 0) {
2365 $author = '(no author)';
2366 - }
2367 - if (defined $::_authors && ! defined $::users{$author}) {
2366 + } elsif (defined $::_authors && ! defined $::users{$author}) {
2367 die "Author: $author not defined in $::_authors file\n";
2368 }
2369 $author;