aboutsummaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorTimo Hirvonen <tihirvon@gmail.com>2006-06-25 13:54:14 +0300
committerJunio C Hamano <junkio@cox.net>2006-06-26 14:58:41 -0700
commit39bc9a6c2051a9fc31dc9b34b40bdd3dd94a8afb (patch)
tree32a9d02f9dd1403bc65261c5f0ab6425cb53ad5f /combine-diff.c
parent0e677e1a6b0d1c0e848ed19d18dda1c3c797c75e (diff)
downloadgit-39bc9a6c2051a9fc31dc9b34b40bdd3dd94a8afb.tar.gz
git-39bc9a6c2051a9fc31dc9b34b40bdd3dd94a8afb.tar.xz
Add msg_sep to diff_options
Add msg_sep variable to struct diff_options. msg_sep is printed after commit message. Default is "\n", format-patch sets it to "---\n". This also removes the second argument from show_log() because all callers derived it from the first argument: show_log(rev, rev->loginfo, ... Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 3daa8cb13..39fb10c14 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -701,7 +701,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
const char *abb;
if (rev->loginfo)
- show_log(rev, rev->loginfo, "\n");
+ show_log(rev, opt->msg_sep);
dump_quoted_path(dense ? "diff --cc " : "diff --combined ", elem->path);
printf("index ");
for (i = 0; i < num_parent; i++) {
@@ -769,7 +769,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct re
inter_name_termination = 0;
if (rev->loginfo)
- show_log(rev, rev->loginfo, "\n");
+ show_log(rev, opt->msg_sep);
if (opt->output_format & DIFF_FORMAT_RAW) {
offset = strlen(COLONS) - num_parent;
@@ -855,7 +855,8 @@ void diff_tree_combined(const unsigned char *sha1,
paths = intersect_paths(paths, i, num_parent);
if (opt->output_format & DIFF_FORMAT_DIFFSTAT && rev->loginfo)
- show_log(rev, rev->loginfo, "---\n");
+ show_log(rev, opt->msg_sep);
+
diff_flush(&diffopts);
if (opt->output_format & DIFF_FORMAT_DIFFSTAT)
putchar('\n');