Remove the "delay writing to avoid runtime penalty of racy-git avoidance"
[gitweb.git] / log-tree.c
index b71cf9ba41b3311b47cbf75bf894f8aeca5ef078..05ede0c175c8af08c2a5834b328ade87df7aa7ff 100644 (file)
@@ -59,7 +59,7 @@ void show_log(struct rev_info *opt, const char *sep)
                fputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout);
                if (opt->parents)
                        show_parents(commit, abbrev_commit);
-               putchar('\n');
+               putchar(opt->diffopt.line_termination);
                return;
        }
 
@@ -97,6 +97,11 @@ void show_log(struct rev_info *opt, const char *sep)
                        subject = "Subject: ";
 
                printf("From %s Mon Sep 17 00:00:00 2001\n", sha1);
+               if (opt->message_id)
+                       printf("Message-Id: <%s>\n", opt->message_id);
+               if (opt->ref_message_id)
+                       printf("In-Reply-To: <%s>\nReferences: <%s>\n",
+                              opt->ref_message_id, opt->ref_message_id);
                if (opt->mime_boundary) {
                        static char subject_buffer[1024];
                        static char buffer[1024];
@@ -139,9 +144,9 @@ void show_log(struct rev_info *opt, const char *sep)
                        printf(" (from %s)",
                               diff_unique_abbrev(parent->object.sha1,
                                                  abbrev_commit));
-               putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
                printf("%s",
                       diff_get_color(opt->diffopt.color_diff, DIFF_RESET));
+               putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
        }
 
        /*