]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: factor out parsing of todo commands
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Fri, 1 May 2026 15:16:38 +0000 (16:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 May 2026 22:00:50 +0000 (07:00 +0900)
commitbe1fd7de6291a86dab983210e55e70dd6fb48579
treeba88fd6064e777688304fd1e354a42335718ae9a
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
sequencer: factor out parsing of todo commands

Move the code that parses todo commands into a separate function so
that it can be shared with "git status" in the next commit. As we
know the input is NUL terminated we do not pass a pointer to the end
of the line and instead test for a blank line by looking for NUL, CR
LF, or LF. We use starts_with() instead of starts_with_mem() for the
same reason. This results in slightly different behavior when there
a CR at the start of the line that is not followed by LF. Previously
such a line was treated as a comment rather than an invalid line.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
sequencer.h