Skip to content

Commit

Permalink
mailinfo: strip "RE: " prefix
Browse files Browse the repository at this point in the history
We already strip the more common Re: and re:, and we do not often
see RE: from saner MUA, but this prefix does exist and gets used
from time to time.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Sep 9, 2012
1 parent 871e293 commit d5b4d80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin/mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ static void cleanup_subject(struct strbuf *subject)
case 'r': case 'R':
if (subject->len <= at + 3)
break;
if (!memcmp(subject->buf + at + 1, "e:", 2)) {
if ((subject->buf[at + 1] == 'e' ||
subject->buf[at + 1] == 'E') &&
subject->buf[at + 2] == ':') {
strbuf_remove(subject, at, 3);
continue;
}
Expand Down

0 comments on commit d5b4d80

Please sign in to comment.