diff options
author | Eric Wong <e@80x24.org> | 2016-04-12 21:16:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-12 21:16:38 +0000 |
commit | 63902f54a8ee411ad588fbabb5d70c9099826345 (patch) | |
tree | f6d568760e1a9594c08cc19a7f1e2c2d3e447291 /lib | |
parent | 4284a260374b0c6d90a3f95b387b82a6f64f3125 (diff) | |
download | public-inbox-63902f54a8ee411ad588fbabb5d70c9099826345.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Import.pm | 6 |
1 files changed, 6 insertions, 0 deletions
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 '') { |