Re: [PATCH v2 2/2] format-patch: reduce patch diffstat width to 72

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

 



On Sat, Jan 27, 2018 at 11:47 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Thu, Jan 25, 2018 at 06:59:27PM +0700, Nguyễn Thái Ngọc Duy wrote:
>
>> diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh
>> index 9f563db20a..1e62333b46 100755
>> --- a/t/t4052-stat-output.sh
>> +++ b/t/t4052-stat-output.sh
>> @@ -60,7 +60,7 @@ do
>>               test_cmp expect actual
>>       '
>>  done <<\EOF
>> -format-patch -1 --stdout
>> +format-patch --stat=80 -1 --stdout
>>  diff HEAD^ HEAD --stat
>>  show --stat
>>  log -1 --stat
>
> This hunk confused me. I think what is going on is this:
>
>   - we have a loop that runs the same test on several commands
>
>   - that loop expects format-patch, diff, etc, to have the same output
>
>   - now that format-patch differs from the other commands in its default
>     length, we need to use a manual --stat-width to get identical output
>
> It seems like that kind of nullifies the point of some of the tests in
> the loop, though, since they are meant to check the behavior without
> --stat.
>
> OTOH, I think that case is tested later (in the other tests you
> adjusted). So I guess these tests are just covering the "name vs bar
> length" part?

My bad. My thought was.. "Hmm.. I would need to take format-patch out
out the loop since it won't match exactly 80 columns anymore. That's a
lot of work. Hey how about using this opportunity to test that --stat=
can still override default settings?" I didn't realize the follow
tests in that loop set stat width. I'll take format-patch out of the
loop and deal with it separately.
-- 
Duy




[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