aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-08-14 14:23:07 +0100
committerJoão Valverde <j@v6e.pt>2016-08-15 10:02:30 +0000
commit3119e2fc23ec2b1d533a37db29fa3c512429d27e (patch)
treee020d27a5985ee9c468590f0d0f098554debe827 /tools
parent47fbdc297ad37bd8a7b5106cdc518d1f82b63d9e (diff)
pre-commit: Fix version check to work with git-worktree
Change-Id: Ie895ca194738a022cc211ae50afbff0a561156a3 Reviewed-on: https://code.wireshark.org/review/17047 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pre-commit b/tools/pre-commit
index 61143e92f6..d084262fa0 100755
--- a/tools/pre-commit
+++ b/tools/pre-commit
@@ -33,7 +33,7 @@ esac
PYBIN=${WS_GITHOOK_PYTHON:-$pyvar}
# Path to hook script in the .git directory
-hook_script=${GIT_DIR:-.git}/hooks/pre-commit
+hook_script="$(git rev-parse --git-path hooks/pre-commit)"
# Always start in the root directory of the source tree, this allows for
# invocations via relative paths (such as ../tools/pre-commit):