diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:39:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-14 21:39:27 -0700 |
commit | cd14f3e17cf60c478ef4e921fc622b6164cb2f25 (patch) | |
tree | 42ece6ade9719a76c10576a8471489eaaba3b317 | |
parent | 66c349027b18d36d13c5a0d798e51aa183d7eacd (diff) | |
parent | d5b4d80d1cc056d5cc4a18f457133b2de8fc685a (diff) | |
download | git-cd14f3e17cf60c478ef4e921fc622b6164cb2f25.tar.gz |
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
-rw-r--r-- | builtin/mailinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index dd4f925475..b691b77158 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; } |