Re: [PATCH 00/26] git-log: implement new --diff-merge options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Elijah Newren <newren@xxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux