Re: [PATCH 00/26] git-log: implement new --diff-merge options
- From
Sergey Organov <sorganov@gmail.com>
- Date
- Dec 10, 2020, 20:10 UTC
- Message-ID
- <87tust777o.fsf@osv.gnss.ru>
- In-Reply-To
- <CABPp-BE7r4iUc6VD60Bdi+fF2bBn6_ZwVPrz_niFpY=LTZMXzw@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
[...]
> As such, I suspect rev->diffopt.flags.exit_with_status will be 0 most > of the time and that the relevant check at the top of log_tree_diff() > really is the "if (!opt->diff)" part of it.
Right, but *why* is it needed? If I do set opt->diff to 1 but don't set opt->diffopt.output_format I get no diff, so the question essentially is: which caller of log_tree_diff() would need to set opt->diffopt.output_format but leave opt->diff to be 0, and why?
Even if such caller exists, it will get no diff, so it seems to be entirely pointless.
> >> Is rev->diff an optimization, does it play another significant role, or >> is it a remnant?
I still don't see what's the correct answer to this question, sorry.
Well, I did a crush-test: commented-out entire if() at the beginning of the log_tree_diff() and ran all the tests. The result was entirely surprising: all the tests pass except one:
Test Summary Report ------------------- ./t1410-reflog.sh (Wstat: 256 Tests: 22 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=912, Tests=23039, 278 wallclock secs (10.48 usr 2.12 sys + 1034.98 cusr 650.30 csys = 1697.88 CPU) Result: FAIL
And now I wonder how comes none of specific test are able to notice the difference, yet seemingly unrelated test fails?
Thanks, -- Sergey