Re: [PATCH v2 3/9] submodule: make static functions read submodules from commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
	};




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux