From: Nathan Binkert Date: Wed, 15 Aug 2007 01:21:23 +0000 (-0700) Subject: style: Don't try to fix files that should be ignored. X-Git-Tag: m5_2.0_beta4~157^2~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9e4daf574e265e419a0a4a6bcbd03edf3a3299f;p=gem5.git 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 --- 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)