Skip to content

Commit d5b4d80

Browse files
committed
mailinfo: strip "RE: " prefix
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 <[email protected]>
1 parent 871e293 commit d5b4d80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builtin/mailinfo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ static void cleanup_subject(struct strbuf *subject)
232232
case 'r': case 'R':
233233
if (subject->len <= at + 3)
234234
break;
235-
if (!memcmp(subject->buf + at + 1, "e:", 2)) {
235+
if ((subject->buf[at + 1] == 'e' ||
236+
subject->buf[at + 1] == 'E') &&
237+
subject->buf[at + 2] == ':') {
236238
strbuf_remove(subject, at, 3);
237239
continue;
238240
}

0 commit comments

Comments
 (0)