From 63902f54a8ee411ad588fbabb5d70c9099826345 Mon Sep 17 00:00:00 2001
From: Eric Wong <e@80x24.org>
Date: Tue, 12 Apr 2016 21:16:38 +0000
Subject: [PATCH] import: filter out [<>] from user names

It confuses the git ident parser and may not be a great
idea to fix in git since it could break interopability
with older versions.
---
 lib/PublicInbox/Import.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index 5bae69df..7073c3d9 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -139,6 +139,12 @@ sub add {
 	my $mid = mid_mime($mime);
 	my $path = mid2path($mid);
 
+	# git gets confused with:
+	#  "'A U Thor <u@example.com>' via foo" <foo@example.com>
+	# ref:
+	# <CAD0k6qSUYANxbjjbE4jTW4EeVwOYgBD=bXkSu=akiYC_CB7Ffw@mail.gmail.com>
+	$name =~ s/<([^>]+)>/($1)/g;
+
 	my ($r, $w) = $self->gfi_start;
 	my $tip = $self->{tip};
 	if ($tip ne '') {
-- 
2.51.0