git fetch now causes all submodules to fetch, slowly

116 views
Skip to first unread message

Vincent Scheib

unread,
Mar 21, 2013, 2:16:51 PM3/21/13
to Chromium-dev
git fetch origin has started also fetching submodules, even on unmanaged git, and does it slowly.

Often I'm fetching from origin to check log history, or to quickly fix up a patch to apply cleanly, and do not have a need to pull submodules. I dislike paying this time cost when I'm not running gclient sync or trying to update DEPS.

Is this required, or a side effect that can be undone?

Ryan Sleevi

unread,
Mar 21, 2013, 3:24:46 PM3/21/13
to Vincent Scheib, John Abd-El-Malek, Chromium-dev
A huge +1 to this.

Seems that this behaviour was introduced in http://crrev.com/189026 -
was it intentional to have this big an effect on workflow?
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
>
>

Bernhard Bauer

unread,
Mar 21, 2013, 3:28:25 PM3/21/13
to rsl...@chromium.org, Vincent Scheib, John Abd-El-Malek, Chromium-dev
Hm, that CL is modifying gclient, whereas Vincent was talking about a pure git fetch. I assume it has something to do with the submodule configuration (for me, git fetch fetches some of the submodules, but not all of them).

Bernhard.

Ryan Sleevi

unread,
Mar 21, 2013, 3:31:20 PM3/21/13
to Bernhard Bauer, Vincent Scheib, John Abd-El-Malek, Chromium-dev
The CL updates your .git/config to tell git to recursively fetch submodules.

Reverting that change (and the changes gclient makes to your
.git/config) restores the original behaviour.

John Abd-El-Malek

unread,
Mar 21, 2013, 4:20:07 PM3/21/13
to Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev, Stefan Zager
+Stefan

What I really needed was the "clone_cmd.append('--recursive')" part. Stefan suggested adding "fetch.recurseSubmodules" so that if a developer fetches manually it also works.

I don't have strong feelings here, other than the first part needs to work (otherwise bring in git repos through DEPS doesn't bring in the whole thing).

Stefan: wdyt?

Stefan Zager

unread,
Mar 21, 2013, 4:36:04 PM3/21/13
to John Abd-El-Malek, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
On Thu, Mar 21, 2013 at 1:20 PM, John Abd-El-Malek <j...@chromium.org> wrote:
+Stefan

What I really needed was the "clone_cmd.append('--recursive')" part. Stefan suggested adding "fetch.recurseSubmodules" so that if a developer fetches manually it also works.

I don't have strong feelings here, other than the first part needs to work (otherwise bring in git repos through DEPS doesn't bring in the whole thing).

Stefan: wdyt?

I think we want to keep both the --recursive flag and the fetch.recurseSubmodules bits, but we don't want to apply them at the top level.

Stefan

Jói Sigurðsson

unread,
Mar 21, 2013, 6:04:52 PM3/21/13
to Stefan Zager, John Abd-El-Malek, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
Sounds good to get this solved. For non-managed workflow, having [ git
pull ] and [ git fetch ] recursively fetch all submodules is very
painful.

Cheers,
Jói

John Abd-El-Malek

unread,
Mar 21, 2013, 8:37:57 PM3/21/13
to Stefan Zager, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
Are you able to make this change? I would but I'm not familiar with this stuff (I'm still not sure I understand how the problem is occurred, since I thought the change I did would only apply to submodules of submodules).
 

Stefan

Henrik Andreasson

unread,
Mar 24, 2013, 5:46:35 AM3/24/13
to John Abd-El-Malek, Stefan Zager, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
Just checking if any work is ongoing here. It still takes more than 15 minutes for me to run gclient sync on Windows.


Nico Weber

unread,
Mar 28, 2013, 1:49:36 PM3/28/13
to hen...@chromium.org, John Abd-El-Malek, Stefan Zager, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
On Sun, Mar 24, 2013 at 2:46 AM, Henrik Andreasson <hen...@chromium.org> wrote:
Just checking if any work is ongoing here. It still takes more than 15 minutes for me to run gclient sync on Windows.

From another thread: Improving this is tracked at http://crbug.com/224074

Roland McGrath

unread,
Mar 28, 2013, 1:54:49 PM3/28/13
to Stefan Zager, John Abd-El-Malek, Ryan Sleevi, Bernhard Bauer, Vincent Scheib, Chromium-dev
On Thu, Mar 21, 2013 at 1:36 PM, Stefan Zager <sza...@google.com> wrote:
> I think we want to keep both the --recursive flag and the
> fetch.recurseSubmodules bits, but we don't want to apply them at the top
> level.

I just tried changing fetch.recurseSubmodules to on-demand and that
makes 'git pull' fast again in the common case, while probably covering
the situations that motivated the setting.
Reply all
Reply to author
Forward
0 new messages