mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user