FrankChen021 commented on code in PR #20477:
URL: https://github.com/apache/druid/pull/20477#discussion_r4173105628
##########
hooks/install-hooks.sh:
##########
@@ -32,10 +32,11 @@ if [ $# != 1 ]
fi
DRUID_ROOT=$1
+GIT_HOOKS_DIR="$(git -C "${DRUID_ROOT}" rev-parse --path-format=absolute
--git-common-dir)/hooks"
Review Comment:
[P2] Respect configured core.hooksPath
**Finding:** When a repository sets core.hooksPath, Git executes hooks from
that configured directory, but this installer always copies the wrappers and
helper directories into the common repository's .git/hooks. The documented
installer therefore leaves the configured hook path empty, so commits and
pushes bypass these checks (and uninstall likewise targets the unused
directory).
**Suggestion:** Resolve the destination with Git's configured hooks path,
such as the absolute form of rev-parse --git-path hooks, in both scripts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]