|
|
@ -2707,6 +2707,7 @@ def CMDgitmodules(parser, args):
|
|
|
|
if delta_path:
|
|
|
|
if delta_path:
|
|
|
|
prefix_length = len(delta_path.replace(os.path.sep, '/')) + 1
|
|
|
|
prefix_length = len(delta_path.replace(os.path.sep, '/')) + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cache_info = []
|
|
|
|
with open(options.output_gitmodules, 'w') as f:
|
|
|
|
with open(options.output_gitmodules, 'w') as f:
|
|
|
|
for path, dep in ls.get('deps').items():
|
|
|
|
for path, dep in ls.get('deps').items():
|
|
|
|
if path in options.skip_dep:
|
|
|
|
if path in options.skip_dep:
|
|
|
@ -2721,13 +2722,13 @@ def CMDgitmodules(parser, args):
|
|
|
|
if prefix_length:
|
|
|
|
if prefix_length:
|
|
|
|
path = path[prefix_length:]
|
|
|
|
path = path[prefix_length:]
|
|
|
|
|
|
|
|
|
|
|
|
subprocess2.call([
|
|
|
|
cache_info += ['--cacheinfo', f'160000,{commit},{path}']
|
|
|
|
'git', 'update-index', '--add', '--cacheinfo',
|
|
|
|
|
|
|
|
f'160000,{commit},{path}'
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
f.write(f'[submodule "{path}"]\n\tpath = {path}\n\turl = {url}\n')
|
|
|
|
f.write(f'[submodule "{path}"]\n\tpath = {path}\n\turl = {url}\n')
|
|
|
|
if 'condition' in dep:
|
|
|
|
if 'condition' in dep:
|
|
|
|
f.write(f'\tgclient-condition = {dep["condition"]}\n')
|
|
|
|
f.write(f'\tgclient-condition = {dep["condition"]}\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if cache_info:
|
|
|
|
|
|
|
|
subprocess2.call(['git', 'update-index', '--add'] + cache_info)
|
|
|
|
subprocess2.call(['git', 'add', '.gitmodules'])
|
|
|
|
subprocess2.call(['git', 'add', '.gitmodules'])
|
|
|
|
print('.gitmodules and gitlinks updated. Please check git diff and '
|
|
|
|
print('.gitmodules and gitlinks updated. Please check git diff and '
|
|
|
|
'commit changes.')
|
|
|
|
'commit changes.')
|
|
|
|