Skip to content

Commit

Permalink
Do not perform recursion by default
Browse files Browse the repository at this point in the history
Add ability to perform recursion by request from the markdown document.

Closes idaholab#29097
  • Loading branch information
milljm committed Nov 19, 2024
1 parent 37b999b commit d8759d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/MooseDocs/extensions/gitutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SubmoduleHashCommand(command.CommandComponent):
def defaultSettings():
settings = command.CommandComponent.defaultSettings()
settings['url'] = (None, "If provided, prefix the hash with the url to create a link.")
settings['recursive'] = (None, "If provided, will pass --recursive argument to git.")
return settings

def createToken(self, parent, info, page, settings):
Expand All @@ -76,7 +77,8 @@ def createToken(self, parent, info, page, settings):
else:
check_dir = MooseDocs.ROOT_DIR

status = mooseutils.git_submodule_info(check_dir, '--recursive')
status = mooseutils.git_submodule_info(check_dir,
'--recursive' if settings["recursive"] else '.')
for repo, ginfo in status.items():
if repo.endswith(name):
url = settings['url']
Expand Down

0 comments on commit d8759d3

Please sign in to comment.