cecemei commented on code in PR #17706:
URL: https://github.com/apache/druid/pull/17706#discussion_r1970943559


##########
hooks/install-hooks.sh:
##########
@@ -32,9 +32,9 @@ if [ $# != 1 ]
 fi
 
 DRUID_ROOT=$1
-
-cp_if_not_exist ${DRUID_ROOT}/hooks/run-all-in-dir.py 
${DRUID_ROOT}/.git/hooks/run-all-in-dir.py
-cp_if_not_exist ${DRUID_ROOT}/hooks/pre-commit 
${DRUID_ROOT}/.git/hooks/pre-commit
-cp_if_not_exist ${DRUID_ROOT}/hooks/pre-push ${DRUID_ROOT}/.git/hooks/pre-push
-cp_if_not_exist ${DRUID_ROOT}/hooks/pre-commits 
${DRUID_ROOT}/.git/hooks/pre-commits
-cp_if_not_exist ${DRUID_ROOT}/hooks/pre-pushes 
${DRUID_ROOT}/.git/hooks/pre-pushes
+GIT_COMMON_DIR=$(eval "git -C $DRUID_ROOT rev-parse --path-format=absolute 
--git-common-dir")

Review Comment:
   it's probably not necessary, but while i was working on this i realized that 
this would change some files (run-all-in-dir.py, pre-commit, pre-push), and our 
script does `cp_if_not_exist` and throws if file is different from the ones in 
`.git` dir, so maybe we'd need to add a `force` flag to installing hook script 
to overwrite those. that might cause minor disruption to ppl's workflow. 



-- 
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]

Reply via email to