From d1566f7883f727f38bf442af3fdb69d36e6fcea2 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Fri, 14 Jul 2006 17:48:51 -0700 Subject: git-format-patch: Make the second and subsequent mails replies to the first Add message_id and ref_message_id fields to struct rev_info, used in show_log with CMIT_FMT_EMAIL to set Message-Id and In-Reply-To/References respectively. Use these in git-format-patch to make the second and subsequent patch mails replies to the first patch mail. Signed-off-by: Josh Triplett Signed-off-by: Junio C Hamano --- log-tree.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index 9d8d46fa0..497198841 100644 --- a/log-tree.c +++ b/log-tree.c @@ -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]; -- cgit v1.2.1 From ce43697379ad8ffcaf061a4709489728c1dbe911 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 23 Jul 2006 05:24:18 -0400 Subject: Colorize 'commit' lines in log ui When paging through the output of git-whatchanged, the color cues help to visually navigate within a diff. However, it is difficult to notice when a new commit starts, because the commit and log are shown in the "normal" color. This patch colorizes the 'commit' line, customizable through diff.colors.commit and defaulting to yellow. As a side effect, some of the diff color engine (slot enum, get_color) has become accessible outside of diff.c. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- log-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index 9d8d46fa0..b71cf9ba4 100644 --- a/log-tree.c +++ b/log-tree.c @@ -129,7 +129,8 @@ void show_log(struct rev_info *opt, const char *sep) opt->diffopt.stat_sep = buffer; } } else { - printf("%s%s", + printf("%s%s%s", + diff_get_color(opt->diffopt.color_diff, DIFF_COMMIT), opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ", diff_unique_abbrev(commit->object.sha1, abbrev_commit)); if (opt->parents) @@ -139,6 +140,8 @@ void show_log(struct rev_info *opt, const char *sep) 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)); } /* -- cgit v1.2.1 From e557667e2d0439451f404794cb308affbc0acfb1 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 24 Jul 2006 14:41:41 +0200 Subject: Always reset the color _before_ printing out the newline This patch brings the benefits of part of v1.4.1-rc2~37 to the "commit" colorizing patch. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- log-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index b71cf9ba4..3a6c84dab 100644 --- a/log-tree.c +++ b/log-tree.c @@ -139,9 +139,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'); } /* -- cgit v1.2.1