From 4654b6d3a6122d259db2c1d1c9492b39443735a6 Mon Sep 17 00:00:00 2001 From: geojeff Date: Sun, 16 Dec 2012 11:16:01 -0600 Subject: [PATCH] Added comment about a possible way to filter staged files for style checking. --- kivy/tools/pep8checker/pre-commit.githook | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kivy/tools/pep8checker/pre-commit.githook b/kivy/tools/pep8checker/pre-commit.githook index 5659efb1b..5198a82f5 100755 --- a/kivy/tools/pep8checker/pre-commit.githook +++ b/kivy/tools/pep8checker/pre-commit.githook @@ -50,6 +50,14 @@ for target in proc.stdout: if parts[0] != 'D': targets.append(join(kivydir, target)) +# Untested possibility: After making the changes above for removing deleted +# files from targets, saw also where the git diff call could be: +# +# git diff --cached --name-only --diff-filter=ACM +# (leaving off D) +# +# and we could then remove the special handling in python for targets above. + call(['git', 'stash', 'save', '--keep-index', '--quiet']) retval = call([sys.executable, script, srcdir] + targets) call(['git', 'stash', 'pop', '--quiet'])