tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 82b690d7da7951bde0238c440139e62e983a0a84
parent 7b2357a37ab0c0293aad3eb185414f086bbe44d9
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue, 16 Apr 2019 08:09:20 -0400

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

Diffstat:
Achanges/ticket30033 | 4++++
Mscripts/git/pre-push.git-hook | 7+++++++
2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/changes/ticket30033 b/changes/ticket30033 @@ -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. diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook @@ -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