fix(utils): handle empty commit messages in CommitInfo.format
Empty git commit messages made splitlines()[0] raise IndexError in format() and /dream-restore list rendering.
This commit is contained in:
1 parent
6de5a0c5ca
commit
85097aa143
3 files changed
+15
-2
No files matched your search
@@ -650,7 +650,7 @@ def _format_dream_restore_list(commits: list) -> str:
|
||||
"",
|
||||
]
|
||||
for c in commits:
|
||||
lines.append(f"- `{c.sha}` {c.timestamp} - {c.message.splitlines()[0]}")
|
||||
lines.append(f"- `{c.sha}` {c.timestamp} - {c.subject()}")
|
||||
lines.extend([
|
||||
"",
|
||||
"Preview a version with `/dream-log <sha>` before restoring it.",
|
||||
|
||||
Reference in new issue
Block a user