From f3b1434fade74d82c4cbf0936e55c583b20819fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Wed, 22 Dec 2021 15:30:52 +0100 Subject: [PATCH] Add support to pull from git-lfs --- scripts/cmake/vcpkg_from_git.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index 0983bf7eb685fb..92e681a78d50cb 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -120,9 +120,17 @@ function(vcpkg_from_git) WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" LOGNAME "git-init-${TARGET_TRIPLET}" ) + vcpkg_execute_in_download_mode( + COMMAND ${GIT} config remote.origin.url ${arg_URL} + RESULT_VARIABLE error_code + WORKING_DIRECTORY "${git_working_directory}" + ) + if(error_code) + message(FATAL_ERROR "Unable to update origin URL") + endif() vcpkg_execute_required_process( ALLOW_IN_DOWNLOAD_MODE - COMMAND "${GIT}" fetch "${arg_URL}" "${ref_to_use}" ${git_fetch_shallow_param} -n + COMMAND "${GIT}" fetch origin "${ref_to_use}" ${git_fetch_shallow_param} -n WORKING_DIRECTORY "${git_working_directory}" LOGNAME "git-fetch-${TARGET_TRIPLET}" )