diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-02-05 15:46:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-07 06:14:31 +0100 |
commit | f1ce6c191e9d15ce78041d8b6496c246b10d9b2d (patch) | |
tree | bd2e245ebc24622e25b7b1f0c1fbe821719ab4dc /log-tree.c | |
parent | range-diff: simplify code spawning `git log` (diff) | |
download | git-f1ce6c191e9d15ce78041d8b6496c246b10d9b2d.tar.xz git-f1ce6c191e9d15ce78041d8b6496c246b10d9b2d.zip |
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 'log-tree.c')
-rw-r--r-- | log-tree.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c index fd0dde97ec..eeacba15dc 100644 --- a/log-tree.c +++ b/log-tree.c @@ -808,6 +808,11 @@ void show_log(struct rev_info *opt) if (cmit_fmt_is_mail(ctx.fmt) && opt->rdiff1) { struct diff_queue_struct dq; struct diff_options opts; + struct range_diff_options range_diff_opts = { + .creation_factor = opt->creation_factor, + .dual_color = 1, + .diffopt = &opts + }; memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff)); DIFF_QUEUE_CLEAR(&diff_queued_diff); @@ -822,8 +827,7 @@ void show_log(struct rev_info *opt) opts.file = opt->diffopt.file; opts.use_color = opt->diffopt.use_color; diff_setup_done(&opts); - show_range_diff(opt->rdiff1, opt->rdiff2, - opt->creation_factor, 1, &opts, NULL); + show_range_diff(opt->rdiff1, opt->rdiff2, &range_diff_opts); memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff)); } |