Skip to content

CMake: fix detection of commit hook when running in git worktree#3407

Open
jdtournier wants to merge 2 commits into
devfrom
pre-commit-hook-in-worktree
Open

CMake: fix detection of commit hook when running in git worktree#3407
jdtournier wants to merge 2 commits into
devfrom
pre-commit-hook-in-worktree

Conversation

@jdtournier

Copy link
Copy Markdown
Member

When running in a git worktree, .git is a file (not a folder) containing the location of the main repo. This causes the detection of the hook to fail, which issues a warning when running cmake even if the hook is installed. This commit uses a more robust way of determining the location of the main git repo (using git --rev-parse --git-common-dir).

@github-actions

Copy link
Copy Markdown

clang-tidy review says "All clean, LGTM! 👍"

clang-format is no longer the exclusive pre-commit hook.
@github-actions

Copy link
Copy Markdown

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants