summaryrefslogtreecommitdiff
path: root/docs/smart-sync.md
diff options
context:
space:
mode:
authorInsaf Latypov <saferif@google.com>2026-10-13 15:50:11 +0000
committergerrit-scoped@luci-project-accounts.iam.gserviceaccount.com <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2026-10-19 12:20:06 -0700
commit46e9866ca0f161604bd45a0c3b7c7887c9415dcb (patch)
tree2f70f0e9b78804ee11f96f427b56066bda5e1e4f /docs/smart-sync.md
parent404aec7b53107a07f29445580f6b5e7a99419757 (diff)
downloadgit-repo-stable.tar.gz
git-repo-stable.zip
sync: Provide a CLI command to opt in/out of smartsync for a user.v2.70stable
Add a boolean `sync.smartsync` setting in the per-user repo config (~/.repoconfig/config): * true: smart sync by default, as if -s were passed. * false: never smart sync by default, even if the manifest enables it. * unset: follow the manifest default, as before. Add docs/repoconfig.md as the user facing documentation for ~/.repoconfig/config and its settings, and point smart-sync.md and the `repo sync` help at it. Bug: 569927750 Test: ./run_tests Change-Id: Ideb4119fcb5e90f8bb35c493d9e4f8bec7878b77 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/643264 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Insaf Latypov <saferif@google.com> Tested-by: Insaf Latypov <saferif@google.com>
Diffstat (limited to 'docs/smart-sync.md')
-rw-r--r--docs/smart-sync.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/smart-sync.md b/docs/smart-sync.md
index 24f37461b..905a004a0 100644
--- a/docs/smart-sync.md
+++ b/docs/smart-sync.md
@@ -204,6 +204,10 @@ still fails the sync, as before. Options that specify an explicit target or
manifest source (such as `-t`/`--smart-tag`, `-m`/`--manifest-name` or
`--superproject-revision`) will also disable the default Smart Sync behavior.
+Users can override this manifest default on their workstation with the
+`sync.smartsync` user setting; see
+[Per-user default](#Per_user-default-sync_smartsync) below.
+
### --smart-sync / -s
Explicitly enables Smart Sync. Repo will call
@@ -231,6 +235,18 @@ match the settings Android build environments automatically setup.
Explicitly disables Smart Sync, overriding any `sync-smartsync="true"` setting
declared in the manifest `<default>` element.
+### Per-user default (sync.smartsync)
+
+A user can decide once, for all their checkouts, whether `repo sync` should
+Smart Sync by default by setting the boolean `sync.smartsync` key in their
+[per-user repo config](./repoconfig.md#smartsync).
+
+Command line flags (`-s`, `--no-smart-sync`, `-t`) override the user setting,
+which in turn overrides the manifest's `sync-smartsync` default. A Smart Sync
+enabled this way is treated as an explicit request, so it is subject to the
+same restrictions as `-s` and fails the sync if no manifest can be obtained
+from the server instead of silently falling back to ToT.
+
### --smart-tag=TAG / -t
Repo will call `GetManifest(TAG)`.