Re: [PATCH 4/6] range-diff: combine all options in a single data structure
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 4, 2021, 23:56 UTC
- Message-ID
- <CAPig+cSNCVT8h-wFBGvDWB4u0OUQM-Q-1DwuLepnjTdwEpk_4A@mail.gmail.com>
- In-Reply-To
- <b620be042eb31c0e771230434951d983f4173ecf.1612469275.git.gitgitgadget@gmail.com>
On Thu, Feb 4, 2021 at 3:24 PM Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 24 quoted lines
> This will make it easier to implement the `--left-only` and
> `--right-only` options.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> diff --git a/range-diff.h b/range-diff.h
> @@ -6,15 +6,20 @@
> +struct range_diff_options {
> + int creation_factor;
> + unsigned dual_color:1;
> + const struct diff_options *diffopt;
> + const struct strvec *other_arg;
> +};
> +
> /*
> * Compare series of commits in RANGE1 and RANGE2, and emit to the
> * standard output. NULL can be passed to DIFFOPT to use the built-in
> * default.
> */
> int show_range_diff(const char *range1, const char *range2,
> - int creation_factor, int dual_color,
> - const struct diff_options *diffopt,
> - const struct strvec *other_arg);
> + struct range_diff_options *opts);The function comment's mention of DIFFOPT becomes outdated with this change. Perhaps update it to say `opts.diffopt` or something.