Re: [PATCH] diff: teach --stat to ignore uninteresting modifications

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

 



>
> For example, if we further change mode bits of file 'x' (which has a
> whitespace-only changes applied in the test in the previous hunk),
> e.g.
>
>         git update-index --chmod=+x x &&
>         git diff --stat -b --cached >actual
>
> should that be counted as a file with 0-line change that is worth
> reporting, or is it hidden?  I _think_ the new code will do a wrong
> thing here.  That is,
>
>  - If the change truly is only mode bits and one and two have
>    "same_contents", the new code is bypassed, and we'll continue to
>    show "0 lines changed, but the file is worth reporting".
>

This first one is the behavior I was going for, I think it's most reasonable

>  - If the change is whitespace-only change plus mode bits, i.e. one
>    and two do not have "same_contents", the new code triggers and
>    the stat output is suppressed for the path.
>

I just ran some tests on my end, and you're correct here, I'll try to come
up with a reroll that addresses this and adds this as a test condition.

-- 
Matthew Rogers



[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