Re: [PATCH v2 3/9] submodule: make static functions read submodules from commits
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 15, 2022, 22:00 UTC
- 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:
Show 10 quoted lines
> 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
};