1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-31 02:25:35 +03:00

Bump git-todo-parser

This fixes a crash in an interactive rebase when there's a merge command in the
rebase-todo file that doesn't have a comment. I don't know under what
circumstances this can happen; git itself doesn't produce these, but it is
theoretically possible for the user to do this manually by doing `git rebase
--edit-todo`, or third-party tools could do it too.

We had one user report a crash because of this, so it seems worth fixing it.
This commit is contained in:
Stefan Haller
2025-09-05 10:37:20 +02:00
parent 2bf2c38e9b
commit ffccfd6e42
4 changed files with 5 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ func parseLine(line string, commentChar byte) (Todo, error) {
}
todo.Label = fields[0]
fields = fields[1:]
if fields[0] == "#" {
if len(fields) > 0 && fields[0] == "#" {
fields = fields[1:]
todo.Msg = strings.Join(fields, " ")
}