Skip to content

Commit

Permalink
now working with issue ESCOMP#50
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jul 4, 2024
1 parent ded91fd commit dae1c82
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions git_fleximod/git_fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ def git_toplevelroot(root_dir, logger):
superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree")
return superroot

def submodules_update(gitmodules, root_dir, requiredlist, force, submodules=None):
if not submodules:
submodules = {}
def submodules_update(gitmodules, root_dir, requiredlist, force):
submodules = {}
for name in gitmodules.sections():
if not submodules or name not in submodules:
submodules[name] = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger)
Expand Down Expand Up @@ -249,12 +248,11 @@ def submodules_update(gitmodules, root_dir, requiredlist, force, submodules=None
# recursively handle this checkout
print(f"Recursively checking out submodules of {name}")
gitsubmodules = GitModules(submodules[name].logger, confpath=repodir)
requiredlist = ["AlwaysRequired"]
newrequiredlist = ["AlwaysRequired"]
if optional:
requiredlist.append("AlwaysOptional")

submodules_update(gitsubmodules, repodir, requiredlist, force=force, submodules=submodules)
newrequiredlist.append("AlwaysOptional")

submodules_update(gitsubmodules, repodir, newrequiredlist, force=force)

def local_mods_output():
text = """\
Expand Down

0 comments on commit dae1c82

Please sign in to comment.