Skip to content

Commit aa5ff03

Browse files
committed
sequencer: replace error() with BUG() in update_squash_messages()
In sequencer.c, caller only pass TODO_SQUASH or TODO_FIXUP to update_squash_messages(), any other command passed in should be considered as BUG. Thus I think `return error('unknown command')` should be replaced as `BUG('unknown command')`. Signed-off-by: Lidong Yan <[email protected]>
1 parent 6f84262 commit aa5ff03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,7 @@ static int update_squash_messages(struct repository *r,
21392139
strbuf_add_commented_lines(&buf, body, strlen(body),
21402140
comment_line_str);
21412141
} else
2142-
return error(_("unknown command: %d"), command);
2142+
BUG(_("unknown command: %d"), command);
21432143
repo_unuse_commit_buffer(r, commit, message);
21442144

21452145
if (!res)

0 commit comments

Comments
 (0)