From 9fd7659505cc3e019339beacc95cd9582f11d52d Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Thu, 16 Apr 2020 17:10:39 -0700 Subject: Add a way to skip the git hooks via an environment variable Signed-off-by: Chris Dickens --- .private/post-rewrite.sh | 4 ++++ .private/pre-commit.sh | 4 ++++ libusb/version_nano.h | 2 +- test | 0 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test 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 diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 459f6be..383d63e 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11497 +#define LIBUSB_NANO 11498 diff --git a/test b/test new file mode 100644 index 0000000..e69de29 -- cgit v1.2.1