sync: Ignore repo project when checking partial syncs

The repo project is fetched at most once a day and should be ignored
when checking if the tree is partially synced.

Bug: b/286126621, b/271507654
Change-Id: I684ed1669c3b3b9605162f8cc9d57185bb3dfe8e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383494
Commit-Queue: Gavin Mak <gavinmak@google.com>
Tested-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
Gavin Mak authored and LUCI committed 2023-08-22 17:13:43 +00:00
1 parent 5a3a5f7cec
commit 321b7934b5
2 files changed
+25 -3

No files matched your search

+5 -1
View File
@@ -2007,7 +2007,11 @@ class _LocalSyncState(object):
"""Return whether a partial sync state is detected."""
self._Load()
prev_checkout_t = None
for data in self._state.values():
for path, data in self._state.items():
if path == self._manifest.repoProject.relpath:
# The repo project isn't included in most syncs so we should
# ignore it here.
continue
checkout_t = data.get(self._LAST_CHECKOUT)
if not checkout_t:
return True