Re: [PATCH 00/40] test whitespace - perform trivial whitespace clean ups of test scripts.

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

 



On Sat, Aug 6, 2011 at 7:20 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Sat, Aug 06, 2011 at 06:41:59PM +1000, Jon Seymour wrote:
>
>> The series applies cleanly to both master and pu.
>>
>> The first patch contains a script, t/test-cleaner.sh, that can
>> automate whitespace cleanup of tests.
>
> Hmm. Can't we do something similar using git itself, and clean up all
> sorts of whitespace errors?
>

Right. That's probably a better way to implement the test and cleanup,
since it ensures the desired heuristic is used.

I will revise accordingly.

I guess the additional advantage of test-cleaner.sh is that it
automates the testing and creation of patches, at least for tests.

As mentioned in another note, it would probably be useful to
generalize this to files other than tests but one would have to use a
more complicated discovery procedure in that case (in order to make it
efficient - one doesn't want to have to run the full test suite to
test every single edit).

> I tried:
>
>  rm t/t1006-cat-file.sh
>  git diff -R | git apply --whitespace=fix
>
> and ended up with the same blob as your script.
>
> In theory you could do the whole tree:
>
>  git ls-files -z | xargs -0 rm
>  git diff -R --binary | git apply --whitespace=fix
>
> though it reports 604 whitespace errors, but only 489 lines fixed. And
> t1006 is not among the modified files. So I wonder if this is a bug in
> git-apply, or am I missing something.
>

Not sure - I'll dig into it.

jon.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]