aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDEGitCommitHooks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'kde-modules/KDEGitCommitHooks.cmake')
-rw-r--r--kde-modules/KDEGitCommitHooks.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/kde-modules/KDEGitCommitHooks.cmake b/kde-modules/KDEGitCommitHooks.cmake
index c00c4c5f..b4819396 100644
--- a/kde-modules/KDEGitCommitHooks.cmake
+++ b/kde-modules/KDEGitCommitHooks.cmake
@@ -63,7 +63,7 @@ function(KDE_CONFIGURE_GIT_PRE_COMMIT_HOOK)
if(KDE_CLANG_FORMAT_EXECUTABLE)
list(FIND ARG_CHECKS "CLANG_FORMAT" _index)
if (${_index} GREATER -1)
- set(CLANG_FORMAT_SCRIPT "./.git/hooks/scripts/clang-format.sh")
+ set(CLANG_FORMAT_SCRIPT "\"$(git rev-parse --git-common-dir)\"/hooks/scripts/clang-format.sh")
configure_file(${CLANG_FORMAT_UNIX} "${GIT_DIR}/hooks/scripts/clang-format.sh" @ONLY)
endif()
else()