diff options
author | Eric Wong <e@80x24.org> | 2015-08-25 01:55:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-08-25 09:06:02 +0000 |
commit | 72c0f7c71ff28de9755dc4aee8b6ce6f0e4f2ed7 (patch) | |
tree | 564a5b73b1b8ecf662907b1efe4aaaf64fcf117a /lib/PublicInbox/Feed.pm | |
parent | 73214b02e581ef0a037d85a1ae37ff425654d7b3 (diff) | |
download | public-inbox-72c0f7c71ff28de9755dc4aee8b6ce6f0e4f2ed7.tar.gz |
This normalizes rerolled patches with identical topics, but does not normalize different patches even if they are in the same thread (for now).
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r-- | lib/PublicInbox/Feed.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 69ce59bd..a0f901eb 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -332,8 +332,12 @@ sub add_topic { $subj = mime_header($header_obj, 'Subject'); } - $subj = $srch->subject_normalized($subj); - if (++$subjs->{$subj} == 1) { + my $topic = $subj = $srch->subject_normalized($subj); + + # kill "[PATCH v2]" etc. for summarization + $topic =~ s/\A\s*\[[^\]]+\]\s*//g; + + if (++$subjs->{$topic} == 1) { unless ($header_obj) { my $mime = do_cat_mail($git, $path) or return 0; $header_obj = $mime->header_obj; |