From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] test-tool run-command: fix confusing init pattern
Date: Fri, 10 Sep 2021 15:05:22 -0700 [thread overview]
Message-ID: <xmqq1r5wrsrh.fsf@gitster.g> (raw)
In-Reply-To: <87pmtgb4m1.fsf@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Fri, 10 Sep 2021 21:32:03 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> 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.
>> #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 }
next prev parent reply other threads:[~2021-09-10 22:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 0:37 [PATCH] test-tool run-command: remove dead "testsuite" code Ævar Arnfjörð Bjarmason
2021-09-07 20:26 ` Junio C Hamano
2021-09-09 11:26 ` Johannes Schindelin
2021-09-09 12:05 ` Ævar Arnfjörð Bjarmason
2021-09-09 13:09 ` [PATCH] test-tool run-command: fix confusing init pattern Ævar Arnfjörð Bjarmason
2021-09-10 11:23 ` Johannes Schindelin
2021-09-10 19:32 ` Ævar Arnfjörð Bjarmason
2021-09-10 22:05 ` Junio C Hamano [this message]
2021-09-11 18:26 ` [PATCH v2] test-tool run-command: fix flip-flop " Ævar Arnfjörð Bjarmason
2021-09-07 21:41 ` [PATCH] test-tool run-command: remove dead "testsuite" code Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1r5wrsrh.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.