diff options
author | John Koleszar <jkoleszar@google.com> | 2012-04-03 15:59:37 -0700 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2012-04-03 17:42:52 -0700 |
commit | d9ca52452bff9481ec1ed4684985a86fb7fc3c3e (patch) | |
tree | aa16d70197d1f95d2944834fa080722930b60fd2 /tools | |
parent | c459d37c26ac65e95b33d71a6f61b4c851b0f3cc (diff) | |
download | libvpx-d9ca52452bff9481ec1ed4684985a86fb7fc3c3e.tar.gz libvpx-d9ca52452bff9481ec1ed4684985a86fb7fc3c3e.tar.bz2 libvpx-d9ca52452bff9481ec1ed4684985a86fb7fc3c3e.zip |
FTFY: only apply on modified files
Ignore renamed, copied, and deleted files when applying the style
rules.
Change-Id: I6102e34f833e5c2ef7a88d6d57bbfdca51b25d94
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ftfy.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ftfy.sh b/tools/ftfy.sh index de0f0eded..1f41fe76b 100755 --- a/tools/ftfy.sh +++ b/tools/ftfy.sh @@ -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;; |