summaryrefslogtreecommitdiff
path: root/build-aux/git-hooks/pre-push
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/git-hooks/pre-push')
-rwxr-xr-xbuild-aux/git-hooks/pre-push4
1 files changed, 3 insertions, 1 deletions
diff --git a/build-aux/git-hooks/pre-push b/build-aux/git-hooks/pre-push
index 6ff59102fd7..8d5dde2bbaf 100755
--- a/build-aux/git-hooks/pre-push
+++ b/build-aux/git-hooks/pre-push
@@ -31,6 +31,8 @@
### Code:
+HOOKS_DIR=$(dirname $0)
+
# Prefer gawk if available, as it handles NUL bytes properly.
if type gawk >/dev/null 2>&1; then
awk="gawk"
@@ -83,4 +85,4 @@ $awk -v origin_name="$1" '
# Print every SHA after oldref, up to (and including) newref.
system("git rev-list --first-parent --reverse " oldref ".." newref)
}
-' | $awk -v reason=pre-push -f ${GIT_DIR:-.git}/hooks/commit-msg-files.awk
+' | $awk -v reason=pre-push -f $HOOKS_DIR/commit-msg-files.awk