From fc9085367388d29250735999883636dc93e5c83f Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Wed, 24 May 2023 19:51:51 -0400 Subject: [PATCH] cmake: only set lfs.url when using ssh URL --- Utilities/SetupForDevelopment.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Utilities/SetupForDevelopment.sh b/Utilities/SetupForDevelopment.sh index fdb043448..8d5486d09 100755 --- a/Utilities/SetupForDevelopment.sh +++ b/Utilities/SetupForDevelopment.sh @@ -29,16 +29,18 @@ git config alias.gitlab-sync '!bash Utilities/GitSetup/git-gitlab-sync' && echo "Set up git gitlab-sync" && true +# shellcheck disable=SC2034 SetupForDevelopment=1 -git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION} +# shellcheck disable=SC2154 +git config hooks.SetupForDevelopment "${SetupForDevelopment_VERSION}" # Setup VTK-m-specifc LFS config # -# Disable lfsurl if our origin points to the main repo -OriginURL=$(git remote get-url origin) -if [[ "$OriginURL" =~ ^(https://|git@)gitlab\.kitware\.com(/|:)vtk/vtk-m\.git$ ]] +# Only set lfs.url to the ssh url +OriginURL="$(git remote get-url origin)" +if [[ "$OriginURL" =~ ^git@gitlab\.kitware\.com:vtk/vtk-m\.git$ ]] then - # Disable this setting which overrides every remote/url lfs setting + # This setting overrides every remote/url lfs setting git config --local lfs.url "${OriginURL}" # Those settings are only available for newer git-lfs releases