Added comment about a possible way to filter staged files for style checking.

This commit is contained in:
geojeff 2012-12-16 11:16:01 -06:00
parent 254497d07b
commit 4654b6d3a6
1 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,14 @@ for target in proc.stdout:
if parts[0] != 'D': if parts[0] != 'D':
targets.append(join(kivydir, target)) 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']) call(['git', 'stash', 'save', '--keep-index', '--quiet'])
retval = call([sys.executable, script, srcdir] + targets) retval = call([sys.executable, script, srcdir] + targets)
call(['git', 'stash', 'pop', '--quiet']) call(['git', 'stash', 'pop', '--quiet'])