Commit af4b823
committed
status: do not report errors in sequencer/todo
commit 4a72486 ("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 b07d9bf ("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/[email protected]/
Reported-by: Espen Antonsen <[email protected]>
Signed-off-by: Phillip Wood <[email protected]>1 parent ebe8a2b commit af4b823
2 files changed
+24
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2177 | 2177 | | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
| 2180 | + | |
2183 | 2181 | | |
2184 | | - | |
| 2182 | + | |
2185 | 2183 | | |
2186 | 2184 | | |
2187 | 2185 | | |
2188 | | - | |
| 2186 | + | |
2189 | 2187 | | |
2190 | 2188 | | |
2191 | 2189 | | |
2192 | 2190 | | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
| 2191 | + | |
| 2192 | + | |
2199 | 2193 | | |
2200 | | - | |
| 2194 | + | |
| 2195 | + | |
2201 | 2196 | | |
2202 | 2197 | | |
2203 | | - | |
2204 | | - | |
2205 | | - | |
| 2198 | + | |
2206 | 2199 | | |
2207 | | - | |
2208 | 2200 | | |
2209 | 2201 | | |
2210 | 2202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
801 | 817 | | |
802 | 818 | | |
803 | 819 | | |
| |||
0 commit comments