Skip to content

Commit cd14f3e

Browse files
committed
Merge branch 'jc/mailinfo-RE'
We strip the prefix from "Re: subject" and also from a less common "re: subject", but left even less common "RE: subject" intact. * jc/mailinfo-RE: mailinfo: strip "RE: " prefix
2 parents 66c3490 + d5b4d80 commit cd14f3e

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)