Uhhh, scratch that - this doesn't actually commit the changes. I'll work on a better version and post it when ready.
On 19 September 2016 at 13:36, Henry Robinson <he...@apache.org> wrote: > I recently added a git hook to automatically format my patches with > git-clang-format. > > It happens on pre-commit. If the commit is --amend, the script chooses > HEAD~1 to compare against instead of HEAD. > > The script is here: > > https://gist.github.com/henryr/e89f9724eb85a6d5ea48ff0027f36793 > > If you want to try it yourself (caveat emptor): > > wget https://gist.githubusercontent.com/henryr/ > e89f9724eb85a6d5ea48ff0027f36793/raw/cb9316ddeceedff798a143ddaa8d96 > 40ec566da3/pre-commit -O ${IMPALA_HOME}/.git/hooks/pre-commit > chmod +x ${IMPALA_HOME}/.git/hooks/pre-commit > > (Warning, may overwrite any existing pre-commit hook you have). > > If we all get to using this or something similar, we'll cut down on all > the review back-and-forth about style and formatting issues, which has to > be worth the time it takes to try out this script. > > Henry > -- Henry Robinson Software Engineer Cloudera 415-994-6679