#!/bin/sh

# This is the single source of truth for where Gitaly's embedded Git hooks are.
if [ -n "$GITALY_BIN_DIR" ]; then
  exec "$GITALY_BIN_DIR/gitaly-hooks" "$(basename $0)" "$@"
else
  hooks_dir="$(dirname $0)/../gitlab-shell/hooks"
  exec "$hooks_dir/$(basename $0)" "$@"
fi
