LFS: Set lfs.url upon the origin url
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
This commit is contained in:
parent
f7826d1efd
commit
dd2aa335e8
@ -1,3 +1,3 @@
|
||||
[lfs]
|
||||
url = https://gitlab.kitware.com/vtk/vtk-m.git/info/lfs
|
||||
pushurl = git@gitlab.kitware.com:vtk/vtk-m.git
|
||||
locksverify = false
|
||||
|
@ -31,3 +31,16 @@ true
|
||||
|
||||
SetupForDevelopment=1
|
||||
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$'
|
||||
then
|
||||
# Disable this setting which overrides every remote/url lfs setting
|
||||
git config --local lfs.url ""
|
||||
|
||||
# Those settings are only available for newer git-lfs releases
|
||||
git config --local remote.lfspushdefault gitlab
|
||||
git config --local remote.lfsdefault origin
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user