sync: Add CLI flag for globally disabling submodule fetch

A global setting for disabling fetching of submodules is useful
since this can currently otherwise only be done by modifying
the manifest, or by explicitly providing projects on command line.

Add this setting as --no-fetch-submodules to mirror the existing
--fetch-submodules.

Change-Id: Ic727c54f11a594aa52315751284b87138cf246bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/607641
Commit-Queue: Josef Malmstrom <Josef.Malmstrom@arm.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Tested-by: Josef Malmstrom <Josef.Malmstrom@arm.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
Josef Malmström authored and gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com committed 2026-07-16 01:19:51 -07:00
1 parent 0398c6718e
commit 978adb7ea5
7 files changed
+83 -8

No files matched your search

+8 -1
View File
@@ -379,7 +379,8 @@ may be necessary if there are problems with the local Python
HTTP client or proxy configuration, but the Git binary works.
The --fetch-submodules option enables fetching Git submodules
of a project from server.
of all projects from the server. The --no-fetch-submodules option disables
fetching Git submodules, even when a project has sync-s="true" in the manifest.
The -c/--current-branch option can be used to only fetch objects that
are on the branch specified by a project's revision.
@@ -573,6 +574,12 @@ later is required to fix a server side protocol bug.
action="store_true",
help="fetch submodules from server",
)
p.add_option(
"--no-fetch-submodules",
dest="fetch_submodules",
action="store_false",
help="don't fetch submodules from server",
)
p.add_option(
"--use-superproject",
action="store_true",