@R no more shallow clone for foreign submodules

This commit is contained in:
bebbo
2017-06-26 14:50:27 +02:00
parent 3cb1bf0fd3
commit 29055bd4c3
+10 -3
View File
@@ -258,10 +258,17 @@ def shallowCheckout(murl, mpath, mbranch):
if path.exists(path.join(mpath, '.git')):
return
if mbranch == None:
execute('git', 'clone', murl, '--depth', '1', mpath)
if '/bebbo/' in murl:
if mbranch == None:
execute('git', 'clone', murl, '--depth', '1', mpath)
else:
execute('git', 'clone', murl, '--depth', '1', '-b', mbranch, mpath)
else:
execute('git', 'clone', murl, '--depth', '1', '-b', mbranch, mpath)
if mbranch == None:
execute('git', 'clone', murl, mpath)
else:
execute('git', 'clone', murl, '-b', mbranch, mpath)
def update():
execute('git', 'submodule', 'init');