Copilot commented on code in PR #13302:
URL: https://github.com/apache/trafficserver/pull/13302#discussion_r3444146170
##########
tools/clang-format.sh:
##########
@@ -38,7 +42,7 @@ function main() {
exit 2
fi
fi
- DIR=${@:-$(dirname ${GIT_DIR})}
+ DIR=${@:-$(dirname ${GIT_COMMON_DIR})}
Review Comment:
`DIR` defaults to `$(dirname ${GIT_COMMON_DIR})`, which is the parent of the
*common* .git directory. In a linked worktree this points at the main
checkout’s root, so running `tools/clang-format.sh` with no explicit path from
within the worktree would format the wrong tree. The cache location can use
`GIT_COMMON_DIR`, but the default formatting target should be the current
worktree (`git rev-parse --show-toplevel`).
--
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]