[m-rev.] for post-commit review: simplify success/failure testing

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Dec 11 13:23:46 AEDT 2023


On 2023-12-11 13:15 +11:00 AEDT, "Peter Wang" <novalazy at gmail.com> wrote:
> Hmm, are you using the 'patience' or 'histogram' git diff algorithms?

I remember that I used patience for some of the diffs I sent over the weekend,
but not which diffs.

> It turns out that the (default) 'myers' or 'minimal' algorithms happen
> to produce a much more reasonable diff for this part of the commit.

I usually use the default diff algorithm, and switch to patience if I don't like
the result, usually because it resynchronizes on something inappopriate,
and screws up the rest of the diff. I then usually check that the switch to patience
has improved the part of the diff in question. For big diffs, I don't always check
what it has done to the rest of the diff, because I have not found patience
to generate output that is *significantly* worse than the default algorithm.
If patience makes the output slightly worse in one part while significantly
improving the output in another part, I will use it.

Unfortunately, I know of no way to specify different diff algorithms for
diffing different files, much less for different parts of the same file.

Thanks for the reviews.

Zoltan.


More information about the reviews mailing list