From 5bbec95c482e1afa9bf217f28f9bfc47a170b745 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 2 Dec 2020 09:13:21 +0100 Subject: 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 --- cmake/QtTopLevelHelpers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake') 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" -- cgit v1.2.3