mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
cmake: only set lfs.url when using ssh URL
This commit is contained in:
parent
00cd139be8
commit
fc90853673
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user