manifest: Add sync-strategy attribute to project elements

The only supported sync-strategy is "stateless". The intent is to keep
the local workspace as small as possible by not keeping history during
syncs. This prevents disk space waste for projects with large binaries
where we only care about the current version.

A follow up change will implement the logic.

Bug: 498730431
Change-Id: I84a436a9ca2492893163c6cfda6c28dc62a568f0
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/568462
Tested-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Gavin Mak
2026-04-01 23:03:03 +00:00
committed by LUCI
parent e8338b54bd
commit 00991bfb42
5 changed files with 101 additions and 21 deletions
+2
View File
@@ -558,6 +558,7 @@ class Project:
sync_s=False,
sync_tags=True,
clone_depth=None,
sync_strategy=None,
upstream=None,
parent=None,
use_git_worktrees=False,
@@ -610,6 +611,7 @@ class Project:
self.sync_s = sync_s
self.sync_tags = sync_tags
self.clone_depth = clone_depth
self.sync_strategy = sync_strategy
self.upstream = upstream
self.parent = parent
# NB: Do not use this setting in __init__ to change behavior so that the