Merge remote-tracking branch 'tor-github/pr/910'

This commit is contained in:
Nick Mathewson 2019-04-16 08:09:20 -04:00
commit 82b690d7da
2 changed files with 11 additions and 0 deletions

4
changes/ticket30033 Normal file
View File

@ -0,0 +1,4 @@
o Minor features (developer tooling):
- Call pre-commit git hook from pre-push hook to make sure we're
running documentation and code style checks before pushing to remote
git repository. Implements feature 30033.

View File

@ -27,6 +27,13 @@ ref_is_upstream_branch() {
fi
}
workdir=$(git rev-parse --show-toplevel)
if [ -x "$workdir/.git/hooks/pre-commit" ]; then
if ! "$workdir"/.git/hooks/pre-commit; then
exit 1
fi
fi
# shellcheck disable=SC2034
while read -r local_ref local_sha remote_ref remote_sha
do