]> granicus.if.org Git - libvpx/commitdiff
FTFY: only apply on modified files
authorJohn Koleszar <jkoleszar@google.com>
Tue, 3 Apr 2012 22:59:37 +0000 (15:59 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Wed, 4 Apr 2012 00:42:52 +0000 (17:42 -0700)
Ignore renamed, copied, and deleted files when applying the style
rules.

Change-Id: I6102e34f833e5c2ef7a88d6d57bbfdca51b25d94

tools/ftfy.sh

index de0f0eded63e8b64a464a443f645e3c0f28e4e11..1f41fe76b6f7cb658d2a37243ea90bf896d635fc 100755 (executable)
@@ -112,8 +112,9 @@ cd "$(git rev-parse --show-toplevel)"
 # Collect the original diff
 git show > "${ORIG_DIFF}"
 
-# Apply the style guide on the modified files and collect its diff
-for f in $(git diff HEAD^ --name-only | grep '\.[ch]$'); do
+# Apply the style guide on new and modified files and collect its diff
+for f in $(git diff HEAD^ --name-only -M90 --diff-filter=AM
+           | grep '\.[ch]$'); do
   case "$f" in
     third_party/*) continue;;
     nestegg/*) continue;;