Skip to content

Instantly share code, notes, and snippets.

@demalex
Last active December 3, 2018 10:39
Show Gist options
  • Save demalex/dace8a5ec67b31d89406196895846dde to your computer and use it in GitHub Desktop.
Save demalex/dace8a5ec67b31d89406196895846dde to your computer and use it in GitHub Desktop.
Script finds diff between two latest commits and passes it to clang-format using brew bundle
git diff HEAD^ --name-only --diff-filter=d | grep -i -e "\.h" -e "\.m" | xargs brew bundle exec clang-format -i --verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment