Skip to content

Commit 3c2fc59

Browse files
committed
Ferengi Rule of Acquisition (inofficial):
A distracted policeman is an opportunity. -- The Sound of Her Voice (DS9 episode)
1 parent 6357ffc commit 3c2fc59

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gitsubmodulesparser2.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,20 @@ def convert_gitmodules(gitmodules_file=gitmodules, force=False):
2323
result = []
2424
for section in config.sections():
2525
if config.has_option(section, 'url'):
26-
submodule_name = config.get(section, 'name', fallback=section)
2726
submodule_path = config.get(section, 'path')
2827
submodule_url = config.get(section, 'url', fallback=None)
2928

29+
# Construct the git command
3030
git_command = "git submodule add"
3131
if force:
3232
git_command += " --force"
3333
git_command += f" {submodule_url if submodule_url else ''} {submodule_path}"
34+
3435
result.append(git_command)
3536

3637
return "\n".join(result)
3738

3839

39-
40-
4140
if __name__ == "__main__":
4241
parser = argparse.ArgumentParser()
4342
parser.add_argument("-f", "--force", action="store_true", help="Add --force flag to git command")

0 commit comments

Comments
 (0)