Thread (53 messages) 53 messages, 6 authors, 2024-03-15

Re: [PATCH 12/15] sequencer: handle multi-byte comment characters when writing todo list

From: Jeff King <hidden>
Date: 2024-03-12 08:21:44

On Fri, Mar 08, 2024 at 10:20:45AM +0000, Phillip Wood wrote:
Hi Peff

On 07/03/2024 09:27, Jeff King wrote:
quoted
We already match multi-byte comment characters in parse_insn_line(),
thanks to the previous commit, yielding a TODO_COMMENT entry. But in
todo_list_to_strbuf(), we may call command_to_char() to convert that
back into something we can output.

We can't just return comment_line_char anymore, since it may require
multiple bytes. Instead, we'll return "0" for this case, which is the
same thing we'd return for a command which does not have a single-letter
abbreviation (e.g., "revert" or "noop"). In that case the caller then
falls back to outputting the full name via command_to_string(). So we
can handle TODO_COMMENT there, returning the full string.
If you do re-roll it might be helpful to emphasize that there is only one
caller.
Thanks, will do.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help