summaryrefslogtreecommitdiff
path: root/.private
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-04-16 17:10:39 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-04-16 17:19:52 -0700
commit9fd7659505cc3e019339beacc95cd9582f11d52d (patch)
tree8c57de14530d60c0e0c875c51a30a792467791cc /.private
parente83f39ba6e0368d8b253a5f0b02bfd115763e0b4 (diff)
downloadlibusb-9fd7659505cc3e019339beacc95cd9582f11d52d.tar.gz
Add a way to skip the git hooks via an environment variable
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to '.private')
-rwxr-xr-x.private/post-rewrite.sh4
-rwxr-xr-x.private/pre-commit.sh4
2 files changed, 8 insertions, 0 deletions
diff --git a/.private/post-rewrite.sh b/.private/post-rewrite.sh
index 0ac4847..60ec3e4 100755
--- a/.private/post-rewrite.sh
+++ b/.private/post-rewrite.sh
@@ -14,6 +14,10 @@
# derivative branch, such as one you would create for private development.
#
+if [ -n "$LIBUSB_SKIP_NANO" ]; then
+ exit 0
+fi
+
case "$1" in
amend)
# Check if a .amend exists. If none, create one and warn user to re-commit.
diff --git a/.private/pre-commit.sh b/.private/pre-commit.sh
index 346d48a..48328f8 100755
--- a/.private/pre-commit.sh
+++ b/.private/pre-commit.sh
@@ -26,6 +26,10 @@
BRANCH_OFFSET=10000
################################################################################
+if [ -n "$LIBUSB_SKIP_NANO" ]; then
+ exit 0
+fi
+
if [ "$BASH_VERSION" = '' ]; then
TYPE_CMD="type git >/dev/null 2>&1"
else