list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Maksim Odnoletkov <>
Subject: Problem using 'submodule.recurse'
Date: Thu, 23 May 2019 18:42:14 +0100	[thread overview]
Message-ID: <> (raw)

I have a problem using 'submodule.recurse' config option. I want to use
it and at the same time fine-tune behavior for individual commands with
more specific options. For example to keep 'on-demand' behavior for
'fetch' and 'pull'.

 * If I put 'fetch.recurseSubmodules = on-demand' *below*
   'submodule.recurse = true' in the config, it kinda works - fetch will
   use 'on-demand' behavior.
 * But with this setup 'fetch' within 'pull' will always recurse
   unconditionally. Looking at the code this happens because 'pull'
   reads 'submodule.recurse' and seeing it in non-default state forces
   this behavior on underlying 'fetch'.

As far as I understand there is no way currently to have 'on-demand'
recursing for 'fetch' within the 'pull' when 'submodule.recurse' is on
(outside of using command line args). Also with described setup 'fetch'
behaves differently from 'pull' which is unexpected.

Looking at the code quickly I see two ways this can be resolved:

 * Add 'pull.recurseSubmodules' option so it can be used to explicitly
   override 'submodule.recurse' for 'pull'.
 * Don't force recursing behavior from 'pull' to underlying 'fetch' if
   it comes from config and not from command line args.

                 reply	other threads:[~2019-05-23 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

  List information:

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

  git send-email \ \ \ \
    --subject='Re: Problem using '\''submodule.recurse'\''' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

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).