Add policy on user-interface changes
[gitweb.git] / log-tree.c
index 6ce239d8f92837ccce7326dab1951f74360eef88..dad551323082461c9fa1e5b9ad56a30d5cfc6343 100644 (file)
@@ -165,14 +165,20 @@ void show_log(struct rev_info *opt, const char *sep)
                if (opt->total > 0) {
                        static char buffer[64];
                        snprintf(buffer, sizeof(buffer),
-                                       "Subject: [PATCH %0*d/%d] ",
+                                       "Subject: [%s %0*d/%d] ",
+                                       opt->subject_prefix,
                                        digits_in_number(opt->total),
                                        opt->nr, opt->total);
                        subject = buffer;
-               } else if (opt->total == 0)
-                       subject = "Subject: [PATCH] ";
-               else
+               } else if (opt->total == 0) {
+                       static char buffer[256];
+                       snprintf(buffer, sizeof(buffer),
+                                       "Subject: [%s] ",
+                                       opt->subject_prefix);
+                       subject = buffer;
+               } else {
                        subject = "Subject: ";
+               }
 
                printf("From %s Mon Sep 17 00:00:00 2001\n", sha1);
                if (opt->message_id)
@@ -186,7 +192,7 @@ void show_log(struct rev_info *opt, const char *sep)
                        snprintf(subject_buffer, sizeof(subject_buffer) - 1,
                                 "%s"
                                 "MIME-Version: 1.0\n"
-                                "Content-Type: multipart/mixed;\n"
+                                "Content-Type: multipart/mixed;"
                                 " boundary=\"%s%s\"\n"
                                 "\n"
                                 "This is a multi-part message in MIME "
@@ -202,13 +208,15 @@ void show_log(struct rev_info *opt, const char *sep)
 
                        snprintf(buffer, sizeof(buffer) - 1,
                                 "--%s%s\n"
-                                "Content-Type: text/x-patch;\n"
+                                "Content-Type: text/x-patch;"
                                 " name=\"%s.diff\"\n"
                                 "Content-Transfer-Encoding: 8bit\n"
-                                "Content-Disposition: inline;\n"
+                                "Content-Disposition: %s;"
                                 " filename=\"%s.diff\"\n\n",
                                 mime_boundary_leader, opt->mime_boundary,
-                                sha1, sha1);
+                                sha1,
+                                opt->no_inline ? "attachment" : "inline",
+                                sha1);
                        opt->diffopt.stat_sep = buffer;
                }
        } else if (opt->commit_format != CMIT_FMT_USERFORMAT) {