Merge branch 'lt/push' into next
[gitweb.git] / commit.c
index af747bde61d8330716e77a4a6db2839d9f8b59c5..f4e4eea014d997f5b825a09f2c9f7620205e6243 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -498,7 +498,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit
        const char *subject = NULL;
 
        if (fmt == CMIT_FMT_EMAIL)
-               subject = "Subject: ";
+               subject = "Subject: [PATCH] ";
        if (fmt == CMIT_FMT_ONELINE || fmt == CMIT_FMT_EMAIL)
                indent = 0;
 
@@ -574,8 +574,9 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit
                }
 
                if (subject) {
-                       memcpy(buf + offset, subject, 9);
-                       offset += 9;
+                       int slen = strlen(subject);
+                       memcpy(buf + offset, subject, slen);
+                       offset += slen;
                }
                memset(buf + offset, ' ', indent);
                memcpy(buf + offset + indent, line, linelen);