From: Oswald Buddenhagen Date: Fri, 24 Mar 2023 08:59:52 GMT Subject: Re: [PATCH] rebase: clarify conditionals in todo_list_to_strbuf() Message-ID: In-Reply-To: On Thu, Mar 23, 2023 at 04:32:41PM -0400, Taylor Blau wrote: >I dunno. I think seeing adjacent > > if (item->command == TODO_ABC) > >and > > if (item->command == TODO_XYZ) > >makes it clear that these two are mutually exclusive, since TODO_ABC != >TODO_XYZ. > no, because you have to prove to yourself that the queried value doesn't change in between. and so does the compiler, which may fail to tail-merge the embedded strbuf_addstr() calls as a consequence. >Specifically: why not combine these two with if-statement that proceeds >it? That might look something like: [...] > i don't see what you're referring to, so i guess you got confused about the location of the code in question?