]> git.ipfire.org Git - thirdparty/git.git/commit - sequencer.c
status: do not report errors in sequencer/todo
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 27 Jun 2019 14:12:46 +0000 (07:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Jun 2019 17:31:02 +0000 (10:31 -0700)
commited5b1ca10b2644f1af3bdfa3da32c67f4df1aa46
tree85c2843beda7c0002761d6abea7b4cef422763d6
parent3e81bccdf3ceab531e95ba3846083dbc8ba0e319
status: do not report errors in sequencer/todo

commit 4a72486de9 ("fix cherry-pick/revert status after commit",
2019-04-16) used parse_insn_line() to parse the first line of the todo
list to check if it was a pick or revert. However if the todo list is
left over from an old cherry-pick or revert and references a commit that
no longer exists then parse_insn_line() prints an error message which is
confusing for users [1]. Instead parse just the command name so that the
user is alerted to the presence of stale sequencer state by status
reporting that a cherry-pick or revert is in progress.

Note that we should not be leaving stale sequencer state lying around
(or at least not as often) after commit b07d9bfd17 ("commit/reset: try
to clean up sequencer state", 2019-04-16). However the user may still
have stale state that predates that commit.

Also avoid printing an error message if for some reason the user has a
file called `sequencer` in $GIT_DIR.

[1] https://public-inbox.org/git/3bc58c33-4268-4e7c-bf1a-fe349b3cb037@www.fastmail.com/

Reported-by: Espen Antonsen <espen@inspired.no>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t7512-status-help.sh