threads / patch / 5685

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

Subject: [PATCH] Allow '(no author)' in git-svn's authors file.

## tl;dr

One message between Sep 25, 2006 and Sep 25, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Shawn Pearce· Sep 25, 2006, 03:04 UTC · lore

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>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-svn.perl +1 −1
diff --git a/git-svn.perl b/git-svn.perl
index 8a2ef99..017f45a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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];
 	}
-- 
1.4.2.1.gde2b2-dirty

← back to recent threads