Skip to content

Commit

Permalink
Use ls-files instead of ls-tree to run whitespace tests.
Browse files Browse the repository at this point in the history
This allows us to check uncommitted files (while still ignoring
ignored files).

Anything that should go into the repo that is not specifically
excluded from testing will be tested.

Note that this also removed the -f test since only files are returned
from ls-files.
  • Loading branch information
dustin committed Sep 15, 2009
1 parent 743fab4 commit c9d03aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/whitespace.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ BEGIN {
push(@exempted, glob("doc/xml2rfc/*.xsl"));
my %exempted_hash = map { $_ => 1 } @exempted;

my @stuff = split /\0/, `git ls-tree -r -z --name-only HEAD`;
@files = grep { -f $_ && ! $exempted_hash{$_} } @stuff;
my @stuff = split /\0/, `git ls-files -z -c -m -o --exclude-standard`;
@files = grep { ! $exempted_hash{$_} } @stuff;

# We won't find any files if git isn't installed. If git isn't
# installed, they're probably not doing any useful development, or
Expand Down

0 comments on commit c9d03aa

Please sign in to comment.