summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-02-05 14:46:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-07 05:14:31 (GMT)
commitf1ce6c191e9d15ce78041d8b6496c246b10d9b2d (patch)
treebd2e245ebc24622e25b7b1f0c1fbe821719ab4dc /builtin/log.c
parent5189bb87249434fba3a82f17b2bc6c93025ba88d (diff)
downloadgit-f1ce6c191e9d15ce78041d8b6496c246b10d9b2d.zip
git-f1ce6c191e9d15ce78041d8b6496c246b10d9b2d.tar.gz
git-f1ce6c191e9d15ce78041d8b6496c246b10d9b2d.tar.bz2
range-diff: combine all options in a single data structure
This will make it easier to implement the `--left-only` and `--right-only` options. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c
index f23ccdb..300b164 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1231,14 +1231,20 @@ static void make_cover_letter(struct rev_info *rev, int use_separate_file,
*/
struct diff_options opts;
struct strvec other_arg = STRVEC_INIT;
+ struct range_diff_options range_diff_opts = {
+ .creation_factor = rev->creation_factor,
+ .dual_color = 1,
+ .diffopt = &opts,
+ .other_arg = &other_arg
+ };
+
diff_setup(&opts);
opts.file = rev->diffopt.file;
opts.use_color = rev->diffopt.use_color;
diff_setup_done(&opts);
fprintf_ln(rev->diffopt.file, "%s", rev->rdiff_title);
get_notes_args(&other_arg, rev);
- show_range_diff(rev->rdiff1, rev->rdiff2,
- rev->creation_factor, 1, &opts, &other_arg);
+ show_range_diff(rev->rdiff1, rev->rdiff2, &range_diff_opts);
strvec_clear(&other_arg);
}
}