tor

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

commit e411fcabd7f52f2ddb108dd3973be944a0e0ef2b
parent c214402a56ea417ee6b7449d8b60cd79ba3070e2
Author: George Kadianakis <desnacked@riseup.net>
Date:   Mon, 19 Aug 2019 18:02:44 +0300

Merge branch 'tor-github/pr/1220'

Diffstat:
Achanges/ticket30979 | 5+++++
Mscripts/git/pre-push.git-hook | 13++++++++-----
Ascripts/maint/practracker/.enable_practracker_in_hooks | 1+
3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/changes/ticket30979 b/changes/ticket30979 @@ -0,0 +1,5 @@ + o Minor features (git hooks): + - Our pre-push git hook now checks for a special file + before running practracker, so that it only runs on branches + that are based on master. + Closes ticket 30979. diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook @@ -28,10 +28,14 @@ if [ -x "$workdir/.git/hooks/pre-commit" ]; then fi fi -if [ -e scripts/maint/practracker/practracker.py ]; then - if ! python3 ./scripts/maint/practracker/practracker.py "$workdir"; then - exit 1 - fi +PT_DIR=scripts/maint/practracker + +if [ -e "${PT_DIR}/practracker.py" ]; then + if [ -e "${PT_DIR}/.enable_practracker_in_hooks" ]; then + if ! python3 "${PT_DIR}/practracker.py" "$workdir"; then + exit 1 + fi + fi fi remote="$1" @@ -104,4 +108,3 @@ do done exit 0 - diff --git a/scripts/maint/practracker/.enable_practracker_in_hooks b/scripts/maint/practracker/.enable_practracker_in_hooks @@ -0,0 +1 @@ +This file is present to tell our git hooks to run practracker on this branch.