git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Huang Zou <huang.zou@schrodinger.com>
To: Philippe Blain <levraiphilippeblain@gmail.com>
Cc: Glen Choo <chooglen@google.com>, git@vger.kernel.org
Subject: Re: Bug Report: fetch.recurseSubmodules doesn't affect git pull as otherwise stated in the git config docs
Date: Mon, 9 May 2022 12:24:38 -0400	[thread overview]
Message-ID: <CAFnZ=JO15s=nXSNSDNeMvS98M49HxZ6N6EfNxP6v7-46i6dDNw@mail.gmail.com> (raw)
In-Reply-To: <b4d7600e-ed4e-b4b3-262a-a69818c25365@gmail.com>

Hi Glen & Philippe,

Thanks for taking the time to look into this!

> > I think the bigger question to ask is "what is the intended effect of
> > 'submodule.recurse = true' and 'fetch.recurseSubmodules = false'?".
>
> Yes, I agree that it would be nice if Huang clarified that as I'm not sure
> either of the use case.

> > Perhaps this is just a performance optimization? i.e. after fetching in
> > the superproject, the user wants to skip the rev walk that discovers new
> > submodule commits.
> >

So the use case here is just performance optimization. My team has
over 10 submodules and I do not deal with most of them. I want to be
able to pull the latest changes quickly (fetching submodules adds ~13
seconds when there are no new commits to a pull that would otherwise
take ~1 second). I want my working tree to be clean after
pulls/checkouts. So checkouts and other commands that update my commit
HEAD should still recursively update submodules (hence
submodule.recurse is true). Although, I may be naively assuming that
fetches can be avoided if I only care about the commit referenced in
the submodule link. If that isn't the case, then the more practical
use-case would be  'submodule.recurse = true' and
'fetch.recurseSubmodules = on-demand', so at least submodules are only
fetched when there are changes.

The other use-case here, which I should have probably included in my
original report, is `git pull` currently also recurse into *inactive
submodules*. i.e. submodules that are not set in "submodule.active".
If my submodules are not active, and not initialized, then git should
not fetch commits in those submodules regardless of the settings in
fetch.recurseSubmodules

I hope this helps clear up a few things!

Thanks,
Huang

  reply	other threads:[~2022-05-09 16:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 14:42 Bug Report: fetch.recurseSubmodules doesn't affect git pull as otherwise stated in the git config docs Huang Zou
2022-05-05 23:57 ` Philippe Blain
2022-05-06 21:50   ` Glen Choo
2022-05-06 22:24     ` Philippe Blain
2022-05-09 16:24       ` Huang Zou [this message]
2022-05-09 23:32 ` Glen Choo
2022-05-10  0:57   ` Philippe Blain

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='CAFnZ=JO15s=nXSNSDNeMvS98M49HxZ6N6EfNxP6v7-46i6dDNw@mail.gmail.com' \
    --to=huang.zou@schrodinger.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    --cc=levraiphilippeblain@gmail.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).