From: Ævar Arnfjörð Bjarmason Date: Tue, 15 Feb 2022 22:00:24 GMT Subject: Re: [PATCH v2 3/9] submodule: make static functions read submodules from commits Message-ID: <220215.86mtirwzzo.gmgdl@evledraar.gmail.com> In-Reply-To: <20220215172318.73533-4-chooglen@google.com> On Wed, Feb 16 2022, Glen Choo wrote: > diff --git a/submodule.c b/submodule.c > index 5ace18a7d9..7032dcabb8 100644 > --- a/submodule.c > +++ b/submodule.c > @@ -932,6 +932,7 @@ struct has_commit_data { > struct repository *repo; > int result; > const char *path; > + const struct object_id *super_oid; > }; ... > - struct has_commit_data has_commit = { r, 1, path }; > + struct has_commit_data has_commit = { r, 1, path, super_oid }; FWIW I wouldn't at all mind the tiny detour of just turning this into designated initializers while we're at it, instead of having to keep track of the positionals. I.e.: [...] = { .repo = r, .result = 1, .path = path, ,super_oid = super_oid };