aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy
diff options
context:
space:
mode:
authorShing Lyu <shing.lyu@gmail.com>2016-10-28 11:41:05 +0800
committerShing Lyu <shing.lyu@gmail.com>2016-10-28 11:41:05 +0800
commit303ba20648f7decd1328534baa802dae40893355 (patch)
tree5cdb5dfc134c551aaf405ca5aa524740b7bb1180 /python/tidy/servo_tidy
parentb4a882f81ab9d8128166a49f0514a398ad7a3b7d (diff)
downloadservo-303ba20648f7decd1328534baa802dae40893355.tar.gz
servo-303ba20648f7decd1328534baa802dae40893355.zip
Don't check untracked file in tidy
Diffstat (limited to 'python/tidy/servo_tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index 17a473ea92a..195ca639139 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -830,14 +830,11 @@ def check_dep_license_errors(filenames, progress=True):
def get_file_list(directory, only_changed_files=False, exclude_dirs=[]):
if only_changed_files:
- # only check the files that have been changed since the last merge
+ # only check tracked files that have been changed since the last merge
args = ["git", "log", "-n1", "--author=bors-servo", "--format=%H"]
last_merge = subprocess.check_output(args).strip()
args = ["git", "diff", "--name-only", last_merge, directory]
file_list = subprocess.check_output(args)
- # also check untracked files
- args = ["git", "ls-files", "--others", "--exclude-standard", directory]
- file_list += subprocess.check_output(args)
for f in file_list.splitlines():
f = os.path.join(*f.split("/")) if sys.platform == "win32" else f
if not any(os.path.join('.', os.path.dirname(f)).startswith(path) for path in exclude_dirs):