]> git.99rst.org Git - git.git/commit
sequencer: factor out parsing of todo commands
authorPhillip Wood <redacted>
Tue, 23 Jun 2026 15:53:56 +0000 (16:53 +0100)
committerJunio C Hamano <redacted>
Tue, 23 Jun 2026 19:18:48 +0000 (12:18 -0700)
commit10c2678a2bfbd2a3e8d0a3623d1b71b6cc916253
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
sequencer.c
sequencer.h
git clone https://git.99rst.org/PROJECT