From d5b4d80d1cc056d5cc4a18f457133b2de8fc685a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 9 Sep 2012 02:59:58 -0700 Subject: [PATCH] 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 --- builtin/mailinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index eaf9e157a..18895ee4d 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -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; } -- 2.26.2