From: Jeff King Date: Tue, 12 Mar 2024 08:21:43 GMT Subject: Re: [PATCH 12/15] sequencer: handle multi-byte comment characters when writing todo list Message-ID: <20240312082143.GD47852@coredump.intra.peff.net> In-Reply-To: <43b7b21f-8d11-4c67-96a6-ff2c8f037263@gmail.com> On Fri, Mar 08, 2024 at 10:20:45AM +0000, Phillip Wood wrote: > Hi Peff > > On 07/03/2024 09:27, Jeff King wrote: > > 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