diff options
Diffstat (limited to 'builtin/mailinfo.c')
-rw-r--r-- | builtin/mailinfo.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index bfb32b7233..eaf9e157a3 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -250,8 +250,17 @@ static void cleanup_subject(struct strbuf *subject) (7 <= remove && memmem(subject->buf + at, remove, "PATCH", 5))) strbuf_remove(subject, at, remove); - else + else { at += remove; + /* + * If the input had a space after the ], keep + * it. We don't bother with finding the end of + * the space, since we later normalize it + * anyway. + */ + if (isspace(subject->buf[at])) + at += 1; + } continue; } break; |