Re: case where diff output needs improving? (was Re: [PATCH v2 0/7] tests: use skip_all=* to skip tests)
On Thu, Aug 12, 2010 at 06:22, Raja R Harinath <harinath@hurrynot.org> wrote:
Show 16 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
> [snip]
>> diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
>> index 10e2db3..ab0c2f0 100755
>> --- a/t/t4016-diff-quote.sh
>> +++ b/t/t4016-diff-quote.sh
>> @@ -14 +14 @@ P2='pathname with SP'
>> -if P3='pathname
>> +P3='pathname
>> @@ -16 +16 @@ with LF'
>> -: 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
>> +if : 2>/dev/null >"$P1" && test -f "$P1" && rm -f "$P1"
>
> Assuming this was from a git invocation, it seems that 'diff' could just
> show line 15 instead of '@@ -16, +16 @@' above.
That was from -U0, and showing line 15 would go against the -U0 parameter.