Re: [PATCH 2/7] submodule-config: add helper function to get 'fetch' config from .gitmodules

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

 



On 06/22, Antonio Ospite wrote:
> diff --git a/submodule-config.c b/submodule-config.c
> index b431555db..ef292eb7c 100644
> --- a/submodule-config.c
> +++ b/submodule-config.c
> @@ -688,3 +688,31 @@ void config_from_gitmodules(config_fn_t fn, void *data)
>  		free(file);
>  	}
>  }
> +
> +struct fetch_config {
> +	int *max_children;
> +	int *recurse_submodules;
> +};
> +
> +static int gitmodules_fetch_config(const char *var, const char *value, void *cb)
> +{
> +	struct fetch_config *config = cb;
> +	if (!strcmp(var, "submodule.fetchjobs")) {
> +		*(config->max_children) = parse_submodule_fetchjobs(var, value);
> +		return 0;
> +	} else if (!strcmp(var, "fetch.recursesubmodules")) {
> +		*(config ->recurse_submodules) = parse_fetch_recurse_submodules_arg(var, value);

There shouldn't be a space before "->" in this line.

-- 
Brandon Williams



[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