style: respect ignores for git commit
Previously it ignored the ignores for git but not Mercurial. Change-Id: I178fe879ebd268e863063eb9e30ec87e8ac8faec Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
parent
8be5717a02
commit
64dccbbf1b
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,7 @@ import sys
|
||||||
|
|
||||||
from style.repo import GitRepo
|
from style.repo import GitRepo
|
||||||
from style.verifiers import all_verifiers, all_regions
|
from style.verifiers import all_verifiers, all_regions
|
||||||
from style.style import StdioUI
|
from style.style import StdioUI, check_ignores
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
@ -66,6 +66,8 @@ failing_files = set()
|
||||||
for status, fname in git.status(filter="MA", cached=True):
|
for status, fname in git.status(filter="MA", cached=True):
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print "Checking %s..." % fname
|
print "Checking %s..." % fname
|
||||||
|
if check_ignores(fname):
|
||||||
|
continue
|
||||||
if status == "M":
|
if status == "M":
|
||||||
regions = git.staged_regions(fname)
|
regions = git.staged_regions(fname)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue