path: root/log-tree.c
diff options
authorJunio C Hamano <>2018-09-17 20:53:56 (GMT)
committerJunio C Hamano <>2018-09-17 20:53:56 (GMT)
commit881c019ea6a0a45f97fb8a1865a88b07263a02ca (patch)
tree1bbb5da82ce92a3ba85114ae641d8fcf62b8d7d6 /log-tree.c
parent688cb1c9891943db1575db38bc0575f75f8b928b (diff)
parent40ce41604daf200cdc85abded0133d40faafc2f8 (diff)
Merge branch 'es/format-patch-rangediff'
"git format-patch" learned a new "--range-diff" option to explain the difference between this version and the previous attempt in the cover letter (or after the tree-dashes as a comment). * es/format-patch-rangediff: format-patch: allow --range-diff to apply to a lone-patch format-patch: add --creation-factor tweak for --range-diff format-patch: teach --range-diff to respect -v/--reroll-count format-patch: extend --range-diff to accept revision range format-patch: add --range-diff option to embed diff in cover letter range-diff: relieve callers of low-level configuration burden range-diff: publish default creation factor range-diff: respect diff_option.file rather than assuming 'stdout'
Diffstat (limited to 'log-tree.c')
1 files changed, 15 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index f482f47..e5b353e 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -16,6 +16,7 @@
#include "line-log.h"
#include "help.h"
#include "interdiff.h"
+#include "range-diff.h"
static struct decoration name_decoration = { "object names" };
static int decoration_loaded;
@@ -751,6 +752,20 @@ void show_log(struct rev_info *opt)
memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
+ if (cmit_fmt_is_mail(ctx.fmt) && opt->rdiff1) {
+ struct diff_queue_struct dq;
+ memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff));
+ DIFF_QUEUE_CLEAR(&diff_queued_diff);
+ next_commentary_block(opt, NULL);
+ fprintf_ln(opt->diffopt.file, "%s", opt->rdiff_title);
+ show_range_diff(opt->rdiff1, opt->rdiff2,
+ opt->creation_factor, 1, &opt->diffopt);
+ memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
+ }
int log_tree_diff_flush(struct rev_info *opt)