Skip to content

Commit 64cda23

Browse files
committed
sequencer: improve error message when an OID could not be parsed
The interactive rebase simply complains about an "invalid line" when the object hash of, say, a `pick` line could not be parsed. Let's tell the user what happened in a little more detail. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5f887e6 commit 64cda23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sequencer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,8 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
21362136
item->arg_len = (int)(eol - item->arg);
21372137

21382138
if (status < 0)
2139-
return -1;
2139+
return error(_("could not parse '%.*s'"),
2140+
(int)(end_of_object_name - bol), bol);
21402141

21412142
item->commit = lookup_commit_reference(r, &commit_oid);
21422143
return !item->commit;

0 commit comments

Comments
 (0)