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


##########
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:
   > cript 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 would be what a plain cp does - but I doubt the initial intention was 
that.
   I don't think these scripts change often; but people may modify it locally...
   
   I think `cp_if_not_exist` should have nothing to do with the usage of `eval`
   
   there is nothing in this which would make `eval` necessary; please remove it.
   
   
   
   



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