Thread (164 messages) flat view 164 messages, 7 authors, 2021-09-18

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

From: Derrick Stolee <hidden>
Date: 2021-02-16 11:43:52

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:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help