summaryrefslogtreecommitdiff
path: root/util/style.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-08-14 18:21:23 -0700
committerNathan Binkert <nate@binkert.org>2007-08-14 18:21:23 -0700
commita9e4daf574e265e419a0a4a6bcbd03edf3a3299f (patch)
tree9ffa82003c8227868ddb83849813371b559535d5 /util/style.py
parent0cb32aadb1e516a6427c660f2d7d06062b04ff8f (diff)
downloadgem5-a9e4daf574e265e419a0a4a6bcbd03edf3a3299f.tar.xz
style: Don't try to fix files that should be ignored.
The style hook was ignoring new files, but processing all modified files. --HG-- extra : convert_revision : 97400c24a12103d7ac3d4f69b026853816c39d72
Diffstat (limited to 'util/style.py')
-rw-r--r--util/style.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/style.py b/util/style.py
index 3d7336388..866bef9b8 100644
--- a/util/style.py
+++ b/util/style.py
@@ -298,6 +298,9 @@ def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
wctx = repo.workingctx()
for fname in modified:
+ if not whitespace_file(fname):
+ continue
+
fctx = wctx.filectx(fname)
pctx = fctx.parents()
assert len(pctx) in (1, 2)