Subject: Re: [PATCH 4/5] commit-graph: refactor dispatch loop for style

From: Derrick Stolee <[email-masked]>
Date: Tue, 16 Feb 2021 13:28:37 -0500

On 2/16/2021 7:02 AM, Ævar Arnfjörð Bjarmason wrote:
> 
> On Tue, Feb 16 2021, Derrick Stolee wrote:
>> The other patches solve real readability problems or reorganize the code
>> to use other concepts within the codebase. This one is much more optional.
> 
> What do you think about
> https://lore.kernel.org/git/[email-masked]/ ? :)

Using a 'goto' is a fine way to avoid a nesting level, but I'm not sure
it "improves readability." Having the tab level makes it clear that that
code is executed only when some condition is met, in this case "if (argc),"
while with the 'goto' we need to know that execution was redirected.

I don't feel too strongly either way. If the code was presented one way or
the other, I probably wouldn't recommend changing to the other mode. In
that sense, the change isn't necessary and causes me to break the tie in
favor of leaving it where it is.

Of course, if someone else says "I like this and would prefer it be used
as an example for future contributors" then the tie is broken in the other
way.

Thanks,
-Stolee