summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorGavin Mak <gavinmak@google.com>2023-08-22 03:10:01 +0000
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-08-22 17:13:43 +0000
commit321b7934b5e8e316b7fa4dc306e055d3d6d351ff (patch)
treed05109fa2394c764ab13d9bbe7937eead3342550 /subcmds/sync.py
parent5a3a5f7cec40c70d8c5ceb473f828e1149724962 (diff)
downloadgit-repo-321b7934b5e8e316b7fa4dc306e055d3d6d351ff.tar.gz
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>
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index df536892..bbe03722 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -2007,7 +2007,11 @@ class _LocalSyncState(object):
2007 """Return whether a partial sync state is detected.""" 2007 """Return whether a partial sync state is detected."""
2008 self._Load() 2008 self._Load()
2009 prev_checkout_t = None 2009 prev_checkout_t = None
2010 for data in self._state.values(): 2010 for path, data in self._state.items():
2011 if path == self._manifest.repoProject.relpath:
2012 # The repo project isn't included in most syncs so we should
2013 # ignore it here.
2014 continue
2011 checkout_t = data.get(self._LAST_CHECKOUT) 2015 checkout_t = data.get(self._LAST_CHECKOUT)
2012 if not checkout_t: 2016 if not checkout_t:
2013 return True 2017 return True