On Thu, May 3, 2018 at 11:30 AM, Johannes Schindelin
<johannes.schinde...@gmx.de> wrote:
> Just like tbdiff, we now show the diff between matching patches. This is
> a "diff of two diffs", so it can be a bit daunting to read for the
> beginnger.

s/beginnger/beginner/

> This brings branch-diff closer to be feature-complete with regard to

s/be feature-complete/feature parity/

> tbdiff.
>
> An alternative would be to display an interdiff, i.e. the hypothetical
> diff which is the result of first reverting the old diff and then
> applying the new diff.
>
> Especially when rebasing often, an interdiff is often not feasible,
> though: if the old diff cannot be applied in reverse (due to a moving
> upstream), an interdiff can simply not be inferred.
>
> Note: while we now parse diff options such as --color, the effect is not
> yet the same as in tbdiff, where also the commit pairs would be colored.

"... tbdiff, in which the commit pairs would also be colored."

However, I don't see the --color option being parsed by this patch, so
perhaps this "Note" can be dropped?

> This is left for a later commit.
>
> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
> ---
> diff --git a/builtin/branch-diff.c b/builtin/branch-diff.c
> @@ -319,24 +348,37 @@ static void output(struct string_list *a, struct 
> string_list *b)
>  int cmd_branch_diff(int argc, const char **argv, const char *prefix)
>  {
> -       int no_patches = 0;
> +       struct diff_options diffopt = { 0 };
>         double creation_weight = 0.6;
>         struct option options[] = {
> -               OPT_BOOL(0, "no-patches", &no_patches,
> -                        N_("short format (no diffs)")),

This was added in 2/18 but never used...

> +               OPT_SET_INT(0, "no-patches", &diffopt.output_format,
> +                           N_("short format (no diffs)"),
> +                           DIFF_FORMAT_NO_OUTPUT),

... and is then replaced in its entirety by this. Perhaps just drop
the original --no-patches from 2/18 and let it be introduced for the
first time here?

>                 { OPTION_CALLBACK,
>                         0, "creation-weight", &creation_weight, N_("factor"),
>                         N_("Fudge factor by which creation is weighted 
> [0.6]"),
>                         0, parse_creation_weight },
>                 OPT_END()
>         };

Reply via email to