mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-26 06:32:19 +00:00
Default per-project `sync-tags` to `false` on non-mirror checkouts whenever `clone-depth` or `repo init --depth` is set to any value (including shallow git submodules) and neither `<project>` nor `<default>` explicitly specifies `sync-tags`. Preserve explicit `sync-tags` overrides on `<default>` and `<project>` across `ToXml()` serialization, and update the manifest format docs and manpage. Also evaluate `clone_filter_for_depth` before checking `_HasShallow()` in `Sync_NetworkHalf` (and guard `RepoProject` via `isinstance` rather than a hardcoded path) so incremental syncs with `REPO_ALLOW_SHALLOW=0` keep passing the configured partial-clone filter when no `.git/shallow` file exists. Previously, depth-limited projects relied on `_RemoteFetch` forcing `--no-tags` only while `depth` remained non-None, so partial-clone or converted checkouts without `.git/shallow` fell back to `sync-tags="true"` and fetched all remote tags. Bug: 584022911 Test: vpython3 run_tests Change-Id: I9167f4e9fc075c4f1514f729acfb188bc093d5c5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/656244 Tested-by: Ram Peri <ramperi@google.com> Commit-Queue: Ram Peri <ramperi@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>