From 5ef36529fb281bee8830897dbb64b3b588857e31 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Apr 24 2024 09:31:30 +0000 Subject: scripts/install-git-hooks: Use --git-common-dir for $GIT_DIR This option works better for the repo via git-worktree --- diff --git a/scripts/install-git-hooks b/scripts/install-git-hooks index 5ecb9ec..4d78a31 100755 --- a/scripts/install-git-hooks +++ b/scripts/install-git-hooks @@ -23,7 +23,7 @@ cdup=$(git rev-parse --show-cdup) || exit cd "${cdup:-./}" || exit -GIT_DIR=$(git rev-parse --git-dir) || exit +GIT_DIR=$(git rev-parse --git-common-dir) || exit SCRIPTS_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") check_snippet()