about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-05-12 09:06:56 +0000
committerEric Wong <e@80x24.org>2016-05-12 09:06:56 +0000
commit8dfd3da2cb7967fcb52dcd816a6e52d143684061 (patch)
treedc64ed8ee3a150bfada7accaef26009b1e13df31 /lib/PublicInbox
parent1f89e15a29cd63335f40902f1de7944e2efe91fa (diff)
downloadpublic-inbox-8dfd3da2cb7967fcb52dcd816a6e52d143684061.tar.gz
import: fallback to email if '<>' exists in author name
git doesn't handle '<' and '>' characters in the author
name at all regardless of quoting, not just matched pairs.
So fall back to using the email as the author name since
the commit info isn't critical, anyways (shallow clones
are fine).
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Import.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 1f52a0cc..1db2a0b8 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -152,7 +152,7 @@ sub add {
         #  "'A U Thor <u@example.com>' via foo" <foo@example.com>
         # ref:
         # <CAD0k6qSUYANxbjjbE4jTW4EeVwOYgBD=bXkSu=akiYC_CB7Ffw@mail.gmail.com>
-        $name =~ s/<([^>]+)>/($1)/g;
+        $name =~ tr/<>// and $name = $email;
 
         my ($r, $w) = $self->gfi_start;
         my $tip = $self->{tip};