git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Problem using 'submodule.recurse'
@ 2019-05-23 17:42 Maksim Odnoletkov
  0 siblings, 0 replies; only message in thread
From: Maksim Odnoletkov @ 2019-05-23 17:42 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-23 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 17:42 Problem using 'submodule.recurse' Maksim Odnoletkov

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

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

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git