Skip to content

Commit 9231f50

Browse files
dermothgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 75b7dfb commit 9231f50

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

git-svn.perl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,8 +2363,7 @@ sub check_author {
23632363
my ($author) = @_;
23642364
if (!defined $author || length $author == 0) {
23652365
$author = '(no author)';
2366-
}
2367-
if (defined $::_authors && ! defined $::users{$author}) {
2366+
} elsif (defined $::_authors && ! defined $::users{$author}) {
23682367
die "Author: $author not defined in $::_authors file\n";
23692368
}
23702369
$author;

0 commit comments

Comments
 (0)