git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: bmwill@google.com, git@vger.kernel.org, jrnieder@gmail.com,
	philipoakley@iee.org
Subject: Re: [PATCH 2/3] builtin/fetch: parse recurse-submodules-default at default options parsing
Date: Fri, 23 Jun 2017 15:36:07 -0700	[thread overview]
Message-ID: <xmqqo9tebaco.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170623191302.16053-3-sbeller@google.com> (Stefan Beller's message of "Fri, 23 Jun 2017 12:13:01 -0700")

Stefan Beller <sbeller@google.com> 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);
>  	}

  reply	other threads:[~2017-06-23 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23 19:12 [PATCH 0/3] pull: optionally rebase submodules Stefan Beller
2017-06-23 19:13 ` [PATCH 1/3] builtin/fetch: factor submodule recurse parsing out to submodule config Stefan Beller
2017-06-23 22:26   ` Junio C Hamano
2017-06-23 19:13 ` [PATCH 2/3] builtin/fetch: parse recurse-submodules-default at default options parsing Stefan Beller
2017-06-23 22:36   ` Junio C Hamano [this message]
2017-06-23 22:49     ` Stefan Beller
2017-06-24  0:51       ` Junio C Hamano
2017-06-27  3:00         ` Stefan Beller
2017-06-27 21:31           ` [PATCH] builtin/fetch cleanup: always set default value for submodule recursing Stefan Beller
2017-06-23 19:13 ` [PATCH 3/3] pull: optionally rebase submodules (remote submodule changes only) Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo9tebaco.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=philipoakley@iee.org \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).