Skip to contentSkip to conversation

Allow '(no author)' in git-svn's authors file.

PATCH New Shawn Pearce 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow '(no author)' in git-svn's authors file.

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.

---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
git-svn.perl +1 -1
index 8a2ef99..017f45a 100755
@@ -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];
 	}
Signature · 1 line
1.4.2.1.gde2b2-dirty