Make git hooks work in git worktrees (#40038)

Make hooks work in worktrees and cleanup hooks
This commit is contained in:
War Pigeon
2025-09-02 18:01:43 -05:00
committed by GitHub
parent 7511b3bed3
commit d3731395b6
3 changed files with 23 additions and 25 deletions

View File

@@ -1,10 +1,10 @@
#!/bin/bash
gitroot=`git rev-parse --show-toplevel`
gitroot=$(git rev-parse --show-toplevel)
cd "$gitroot/BuildChecker"
cd "$gitroot/BuildChecker" || exit
if [[ `uname` == MINGW* || `uname` == CYGWIN* ]]; then
if [[ $(uname) == MINGW* || $(uname) == CYGWIN* ]]; then
# Windows
py -3 git_helper.py --quiet
else