git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org, "Martin Ågren" <martin.agren@gmail.com>
Subject: Re: [PATCH 00/12] c99: use more designated initializers
Date: Thu, 24 Feb 2022 23:43:58 +0100	[thread overview]
Message-ID: <220224.86y21z98zr.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqsfs8kpm4.fsf@gitster.g>


On Thu, Feb 24 2022, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> This is probably a bit premature given that we still are treating the
>> C99-isms as weather balloons. The idea was to keep things in an
>> easily-revertable state for at least a couple of major versions.
>>
>> The referenced changes are only in core Git as of v2.34.0, and we are not
>> even half-way through the v2.36.0 cycle.
>
> The proposed commit log messages need updating.  By refering to much
> newer commits created by the same author, instead of the beginning
> of the official weather balloon experiments, it created an unnecessary
> confusion.
>
> Read the CodingGuidelines document.  Everybody knows what it says by
> heart by now, right? ;-)
>
>    . since mid 2017 with cbc0f81d, we have been using designated
>      initializers for struct (e.g. "struct t v = { .val = 'a' };").
>
>    . since mid 2017 with 512f41cf, we have been using designated
>      initializers for array (e.g. "int array[10] = { [5] = 2 }").
>
> I do not think doing this in early 2022 is still premature.

It's hard sometimes to anticipate what'll be the best reference. I
figured linking to similar recent tree-wide changes would make it easier
for reviewers to shortcut to "oh, we had similar tree-wide changes
recently, so this is OK too".

As opposed to referencing the initial forays into designated
initializers, which wouldn't provide the same overview of how tree-wide
this pattern already is at a glance.

But sure, I can mention that more prominently/discuss both.

> I hate to having to deal with such a tree-wide churn, though.  I'd
> rather see "let's do this only on quiescent part of the tree a small
> bit at a time" like on imap-send.c but not involving anything known
> to be actively touched, like ref backends.

While these are tree-wide, I don't think you'll have any trouble with
them, including the ones touching the refs backend.

We're anticipating the final bits of the reftable integration, which
will add another declaration like the one in 2/12, but that won't
conflict with these modifications of the existing assignment.

Of course such a change might also want to use designated initializers
to match, but that would have been a good idea anyway for new code
regardless of whether this series got merged or not.

  reply	other threads:[~2022-02-24 22:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  9:32 [PATCH 00/12] c99: use more designated initializers Ævar Arnfjörð Bjarmason
2022-02-24  9:32 ` [PATCH 01/12] imap-send.c: use designated initializers for "struct imap_server_conf" Ævar Arnfjörð Bjarmason
2022-02-24  9:32 ` [PATCH 02/12] refs: use designated initializers for "struct ref_storage_be" Ævar Arnfjörð Bjarmason
2022-02-24  9:32 ` [PATCH 03/12] refs: use designated initializers for "struct ref_iterator_vtable" Ævar Arnfjörð Bjarmason
2022-02-24  9:32 ` [PATCH 04/12] trace2: use designated initializers for "struct tr2_tgt" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 05/12] trace2: use designated initializers for "struct tr2_dst" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 06/12] object-file: use designated initializers for "struct git_hash_algo" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 07/12] archive-*.c: use designated initializers for "struct archiver" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 08/12] userdiff.c: use designated initializers for "struct userdiff_driver" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 09/12] convert.c: use designated initializers for "struct stream_filter*" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 10/12] refspec.c: use designated initializers for "struct refspec_item" Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 11/12] misc *.c: use designated initializers for struct assignments Ævar Arnfjörð Bjarmason
2022-02-24  9:33 ` [PATCH 12/12] misc *.c: use designated initializers for "partial" " Ævar Arnfjörð Bjarmason
2022-02-24 19:22 ` [PATCH 00/12] c99: use more designated initializers Johannes Schindelin
2022-02-24 19:53   ` Junio C Hamano
2022-02-24 22:43     ` Ævar Arnfjörð Bjarmason [this message]
2022-02-25  0:03 ` Junio C Hamano

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=220224.86y21z98zr.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.agren@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).