LFS: Set default url to the current origin url

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
This commit is contained in:
Vicente Adolfo Bolea Sanchez 2021-07-16 16:18:10 -04:00
parent 1485af6e87
commit 7ea282734a

@ -35,10 +35,11 @@ git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
# Setup VTK-m-specifc LFS config
#
# Disable lfsurl if our origin points to the main repo
if git remote get-url origin | grep -Poq '^(https://|git@)gitlab.kitware.com(/|:)vtk/vtk-m.git$'
OriginURL=$(git remote get-url origin)
if [[ "$OriginURL" =~ ^(https://|git@)gitlab\.kitware\.com(/|:)vtk/vtk-m\.git$ ]]
then
# Disable this setting which overrides every remote/url lfs setting
git config --local lfs.url ""
git config --local lfs.url "${OriginURL}"
# Those settings are only available for newer git-lfs releases
git config --local remote.lfspushdefault gitlab