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

From: Derrick Stolee <[email-masked]>
Date: Tue, 16 Feb 2021 06:40:39 -0500

On 2/15/2021 1:53 PM, Taylor Blau wrote:
> On Mon, Feb 15, 2021 at 07:41:17PM +0100, Ævar Arnfjörð Bjarmason wrote:
>> I think it's more readable to have one if/elsif/else chain here than
>> the code this replaces.
> 
> FWIW, I find the pre-image more readable than what you are proposing
> replacing it with here.
> 
> Of course, I have no doubts about the obvious correctness of this patch;
> I'm merely suggesting that I wouldn't be sad to see us apply the first
> three patches, and the fifth patch, but drop this one.

I agree with all of your points here. I think that compared to the
current code at-rest, the new version might be preferred. It's a little
dense, which is my only complaint.

The issue comes for the future: what if we need to add a third verb
to 'git commit-graph'? Then extending this new option looks worse since
we would check 'argc' three times.

The other patches solve real readability problems or reorganize the code
to use other concepts within the codebase. This one is much more optional.

Thanks,
-Stolee