Merge branch 'jc/mailinfo-RE' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 20 Sep 2012 22:55:03 +0000 (15:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Sep 2012 22:55:03 +0000 (15:55 -0700)
* jc/mailinfo-RE:
mailinfo: strip "RE: " prefix

builtin/mailinfo.c
index eaf9e157a3897c2442756911b906ff9d3ee2be90..18895ee4d9c987ec97d6781a5ffe5ec935bf19c7 100644 (file)
@@ -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;
                        }