Allow '(no author)' in git-svn's authors file.
authorShawn Pearce <spearce@spearce.org>
Mon, 25 Sep 2006 03:04:55 +0000 (23:04 -0400)
committerJunio C Hamano <junkio@cox.net>
Mon, 25 Sep 2006 03:19:28 +0000 (20:19 -0700)
When trying to import an SVN revision which has no author the Git
user may desire to relabel '(no author)' to another name and email
address with their svn.authorsfile.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-svn.perl
index 8a2ef9909cfa23dd3b588c6ada22995c25ce4c54..017f45ac972cf030e545258af0e3793ad1b87e3f 100755 (executable)
@@ -2171,7 +2171,7 @@ sub load_authors {
        open my $authors, '<', $_authors or die "Can't open $_authors $!\n";
        while (<$authors>) {
                chomp;
-               next unless /^(\S+?)\s*=\s*(.+?)\s*<(.+)>\s*$/;
+               next unless /^(\S+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/;
                my ($user, $name, $email) = ($1, $2, $3);
                $users{$user} = [$name, $email];
        }