fix(interpreter): ensure commit message consistency for submodules
This commit is contained in:
parent
14eefebd67
commit
d28fad77c7
@ -191,18 +191,20 @@ def format_tree_output(base_path, submodule_diffs, commit):
|
||||
base_diff = get_git_diff(base_path, True)
|
||||
|
||||
output = [f"📦 {base_name}"]
|
||||
output.append(f"└── 📝 {commit[base_path]}:")
|
||||
for line in base_diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
if base_path in commit:
|
||||
output.append(f"└── 📝 {commit[base_path]}:")
|
||||
for line in base_diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
|
||||
if submodule_diffs:
|
||||
output.append("└── 📚 Submodules:")
|
||||
for submodule_path, diff in submodule_diffs.items():
|
||||
name = os.path.basename(submodule_path)
|
||||
output.append(f"└── 📝 {commit[submodule_path]}:")
|
||||
output.append(f" └── 📦 {name}")
|
||||
for line in diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
if submodule_path in commit:
|
||||
output.append(f"└── 📝 {commit[submodule_path]}:")
|
||||
output.append(f" └── 📦 {name}")
|
||||
for line in diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
|
||||
return "\n".join(output)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user