]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'tor-github/pr/1241'
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Aug 2019 14:15:25 +0000 (10:15 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Aug 2019 14:15:25 +0000 (10:15 -0400)
1  2 
scripts/git/pre-commit.git-hook

index 7c7cf88574f8f87c935599a3aad363967a099c67,37060fdbe860bdae2e32283be3799c86c37b218d..b2a1847a2bcddd77f181ae8781d48997550b7d79
@@@ -36,10 -37,19 +37,19 @@@ elif [ -d src/common ]; the
           src/tools/*.[ch]
  fi
  
 -if test -e scripts/maint/checkIncludes.py; then
 -    python scripts/maint/checkIncludes.py
 +if test -e scripts/maint/practracker/includes.py; then
 +    python scripts/maint/practracker/includes.py
  fi
  
- if [ -e scripts/maint/practracker/practracker.py ]; then
-   python3 ./scripts/maint/practracker/practracker.py "$workdir"
+ # Only call practracker if ${PT_DIR}/.enable_practracker_in_hooks exists
+ # We do this check so that we can enable practracker in hooks in master, and
+ # disable it on maint branches
+ 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