Re: [PATCH 2/3] builtin/fetch: parse recurse-submodules-default at default options parsing

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

 



Stefan Beller <sbeller@xxxxxxxxxx> writes:

> @@ -1333,10 +1336,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
>  		deepen = 1;
>  
>  	if (recurse_submodules != RECURSE_SUBMODULES_OFF) {
> -		if (recurse_submodules_default) {
> -			int arg = parse_fetch_recurse_submodules_arg("--recurse-submodules-default", recurse_submodules_default);
> -			set_config_fetch_recurse_submodules(arg);
> -		}
> +		if (recurse_submodules_default != RECURSE_SUBMODULES_DEFAULT)
> +			set_config_fetch_recurse_submodules(recurse_submodules_default);

This is not a new thing, and it may not even be a problem, but I
have to wonder why this needs to be done conditionally.  "The
command line did not explicitly say --no-recurse-submodules, so we
would set what came from --recurse-submodule-default if and only if
that is given---otherwise we leave it as a compiled-in default" is
what the code before or after this patch tells me.  But if we drop
the "if (default is not DEFAULT)", the resulting code becomes "The
command line did not explicitly say --no-recurse-submodules, so we
would set whatever is the default (which may not have been given
from the command line, but came built-in to the binary)".  Aren't
they saying the same thing?

It's not like there is a configuration knob that further interferes
the interaction between these two.  I am puzzled.


>  		gitmodules_config();
>  		git_config(submodule_config, NULL);
>  	}



[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