aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-12-02 09:13:21 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-12-02 10:37:16 +0100
commit5bbec95c482e1afa9bf217f28f9bfc47a170b745 (patch)
treebf4acd39218cad3bc844b31e1356a9b2a034f34e /cmake
parent21fea13125ff9d1ce80e23381a09a4c442fb50fe (diff)
Add worktrees as detached
Since we later check the worktree out to the revision specified in the dependency file, add it as detached to avoid conflicts with already existing worktrees for the default branch. As a drive-bye, fix a typo in a comment. Pick-to: 6.0 Change-Id: I81c30c1fa3cfc9831fe7884a103746b43478dd8e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtTopLevelHelpers.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/QtTopLevelHelpers.cmake b/cmake/QtTopLevelHelpers.cmake
index 920378c3..990013f5 100644
--- a/cmake/QtTopLevelHelpers.cmake
+++ b/cmake/QtTopLevelHelpers.cmake
@@ -201,7 +201,7 @@ function(qt_internal_get_dependency dependent dependency)
# for the module we want, there seems to be a clone parallel to what we have
message(NOTICE "Adding worktree for ${dependency} from ${gitdir}${dependency}")
execute_process(
- COMMAND "git" "worktree" "add" "${CMAKE_CURRENT_SOURCE_DIR}/${dependency}"
+ COMMAND "git" "worktree" "add" "--detach" "${CMAKE_CURRENT_SOURCE_DIR}/${dependency}"
WORKING_DIRECTORY "${gitdir}/${dependency}"
RESULT_VARIABLE git_result
${swallow_output}
@@ -210,7 +210,7 @@ function(qt_internal_get_dependency dependent dependency)
message(FATAL_ERROR "Failed to check '${module}' out to '${revision}': ${git_output}")
endif()
else()
- # we don't find the existing clone, so clone from the saame remote
+ # we don't find the existing clone, so clone from the same remote
message(NOTICE "Cloning ${dependency} from ${remote}${dependency}.git")
execute_process(
COMMAND "git" "clone" "${remote}${dependency}.git"