mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
scripts: Add env variable to disable pre-commit hook
We introduce TOR_EXTRA_PRE_COMMIT_CHECKS environment variable to run the pre-commit hook. The pre-push git hook will set it in order to run all pre-commit checks. Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
064e23e95c
commit
8ae0ecbd6a
@ -7,6 +7,11 @@
|
||||
# it fails our code formatting, changelog entry formatting, module include
|
||||
# rules, or best practices tracker.
|
||||
|
||||
# Run only if this environment variable is set.
|
||||
if [ -z "$TOR_EXTRA_PRE_COMMIT_CHECKS" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
workdir=$(git rev-parse --show-toplevel)
|
||||
|
||||
cd "$workdir" || exit 1
|
||||
|
@ -83,6 +83,7 @@ do
|
||||
src/tools/*.[ch] \
|
||||
)"
|
||||
|
||||
export TOR_EXTRA_PRE_COMMIT_CHECKS=1
|
||||
# We want word splitting here, because file names are space
|
||||
# separated
|
||||
# shellcheck disable=SC2086
|
||||
|
Loading…
Reference in New Issue
Block a user