Re: [PATCH] test-tool run-command: fix confusing init pattern
From: Junio C Hamano <hidden>
Date: 2021-09-10 22:05:28
Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
The diff does too many things, some of which are your purely personal preferences and do not actually need to be changed. This is a much more to-the-point diff:We've been slowly converting everything to designated initializers. It seems to make sense to just do that if the line is being touched anyway.
Perhaps a preliminary clean-up patch is called for in such a case? I do not think anybody can immediately see what the difference between the old -1 and the new 0 in TESTSUITE_INIT macro means in Dscho's alternative, but if we had a preliminary clean-up whose sole change is to use designated initializers, the real "to-the-point" step would become much easier to see which member that used to be initialized to -1 is now getting zero-initialized. And yes, changing the initializer style *and* the values the members are initialized to in a same patch is much worse than sticking to the style of the unreadable original. It buries the real change in the noise.
quoted
#define TESTSUITE_INIT \ - { STRING_LIST_INIT_DUP, STRING_LIST_INIT_DUP, -1, 0, 0, 0, 0, 0, 0 } + { STRING_LIST_INIT_DUP, STRING_LIST_INIT_DUP, 0, 0, 0, 0, 0, 0, 0 }