<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/subcmds/sync.py, branch v2.63</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.63</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.63'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-04-20T22:34:07+00:00</updated>
<entry>
<title>sync: Refactor to use _RunOneGC and fix config leakage</title>
<updated>2026-04-20T22:34:07+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-20T17:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=baa281d99e59dbf1447524e6fd95b384cadbc06e'/>
<id>urn:sha1:baa281d99e59dbf1447524e6fd95b384cadbc06e</id>
<content type='text'>
Extract _RunOneGC to handle GC on a single project. This refactoring
makes it easier to invoke GC from parallel worker tasks.

Also, avoid modifying the passed-in config dictionary in _RunOneGC by
creating a local copy, preventing unintended side effects on other
commands sharing the same config.

Bug: 498290329
Change-Id: I7b77ed6629b14b5ee3322870b9c6c8ce2bfd6ea2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574923
Reviewed-by: Becky Siegel &lt;beckysiegel@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Switch to using self._bloated_projects</title>
<updated>2026-04-20T21:07:14+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-20T17:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=7e9079b7cf79988dd978d04bfb79250564829cc3'/>
<id>urn:sha1:7e9079b7cf79988dd978d04bfb79250564829cc3</id>
<content type='text'>
Store bloated projects in self._bloated_projects and print warnings at
the end of execution. This sets up for moving the check to workers.

Bug: 498290329
Change-Id: I993f1fd741db2994d480994861588eb18f6c5503
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574922
Reviewed-by: Becky Siegel &lt;beckysiegel@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Provide feedback during post-sync operations</title>
<updated>2026-04-17T22:47:15+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-04-17T20:31:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4f707ff91e16af5b19565504df67351c4d28370e'/>
<id>urn:sha1:4f707ff91e16af5b19565504df67351c4d28370e</id>
<content type='text'>
After the main sync progress bar finishes, there's a pause while some
post-sync operations run. Print something to provide feedback so the
user doesn't think repo has hung.

Bug: 503869525
Change-Id: I695fd560e60dcb394e6844a56c8a336ca1f71c74
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/574425
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Becky Siegel &lt;beckysiegel@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>Fix all flake8 warnings from newer flake8-bugbear and flake8-comprehensions</title>
<updated>2026-04-03T14:50:52+00:00</updated>
<author>
<name>Carlos Fernandez</name>
<email>carlosfsanz@meta.com</email>
</author>
<published>2026-03-26T20:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=573983948ae0550b0f655ea81431bb08ce0bd540'/>
<id>urn:sha1:573983948ae0550b0f655ea81431bb08ce0bd540</id>
<content type='text'>
Address warnings introduced by flake8-bugbear 24.12.12 and
flake8-comprehensions 3.16.0:

- C408: Replace dict()/list() calls with literal {} and []
- C413: Remove unnecessary list() around sorted()
- C414: Remove unnecessary list() inside sorted()
- C419: Suppress intentional list comprehension in all() (noqa)
- B001: Replace bare except with except Exception
- B006: Replace mutable default arguments with None
- B010: Replace setattr() with direct attribute assignment
- B017: Use RuntimeError instead of Exception in tests
- B019: Suppress lru_cache on methods for long-lived objects (noqa)
- B033: Remove duplicate item in set literal

Change-Id: If4693d3e946200bbc22f689f7b94da604addcb80
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/566321
Tested-by: Carlos Fernandez &lt;carlosfsanz@meta.com&gt;
Commit-Queue: Carlos Fernandez &lt;carlosfsanz@meta.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>Use git_superproject.UseSuperproject() everywhere</title>
<updated>2026-03-19T04:03:07+00:00</updated>
<author>
<name>Jacky Liu</name>
<email>qsliu@google.com</email>
</author>
<published>2026-03-16T05:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0176586544d36d2902d6b8442ea4dc78e7921b8e'/>
<id>urn:sha1:0176586544d36d2902d6b8442ea4dc78e7921b8e</id>
<content type='text'>
Currently somewhere use git_superproject.UseSuperproject(), which checks
both the manifest config and user's config, and otherwhere use
manifest.manifestProject.use_superproject, which only checks the
manifest config. This causes Inconsistent behaviors for users who do not
set --use-superproject when doing repo init but have
repo.superprojectChoice in their git config.

Replace where using manifest.manifestProject.use_superproject with
git_superproject.UseSuperproject() to respect user's config and avoid
inconsistency.

Bug: 454514213
Change-Id: I1f734235cdd67b8a6915f1d05967d1aaa4d03f2a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/561801
Commit-Queue: Jacky Liu &lt;qsliu@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Jacky Liu &lt;qsliu@google.com&gt;
</content>
</entry>
<entry>
<title>manifest: Introduce `sync-j-max` attribute to cap sync jobs</title>
<updated>2026-02-06T21:32:28+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2026-02-03T20:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a214fd31bd477dda2708ab9f3bc675081ceff696'/>
<id>urn:sha1:a214fd31bd477dda2708ab9f3bc675081ceff696</id>
<content type='text'>
Add a way for manifest owners to limit how many sync jobs run in
parallel.

Bug: 481100878
Change-Id: Ia6cbe02cbc83c9e414b53b8d14fe5e7e1b802505
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/548963
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: skip bloat check if fresh sync</title>
<updated>2025-12-15T23:24:45+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-12-15T20:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=871e4c7ed153682a77de44e300b5f5461eb08538'/>
<id>urn:sha1:871e4c7ed153682a77de44e300b5f5461eb08538</id>
<content type='text'>
Initial syncs won't have accumulated any garbage.

Bug: 379111283
Change-Id: I04b2ecde3e33f1f055038861a2705ab6aabb36d1
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/536083
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>project: only use --no-auto-gc for git 2.23.0+</title>
<updated>2025-12-15T19:32:49+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-12-15T18:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5b0b5513d6fe009f4600399203b28490a38a7cf0'/>
<id>urn:sha1:5b0b5513d6fe009f4600399203b28490a38a7cf0</id>
<content type='text'>
The flag for git fetch was introduced in git 2.23.0. Also skip the bloat
check after sync if using an older version.

Bug: 468589976
Bug: 379111283
Change-Id: Ib53e5494350c71a83906e5219d3a8c2b654e531f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/536082
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Add heuristic warning for bloated shallow repositories</title>
<updated>2025-12-10T19:34:40+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-12-09T22:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b5991d71283c0c3a5d31e371d34c4d976bde63fd'/>
<id>urn:sha1:b5991d71283c0c3a5d31e371d34c4d976bde63fd</id>
<content type='text'>
For clone-depth="1" repositories that are dirty or have local commits,
add a check at the end of sync to detect excessive git object
accumulation.

This prevents silent performance degradation and disk exhaustion in
large prebuilts repos where automatic GC is typically disabled from
https://gerrit.googlesource.com/git-repo/+/7f87c54043ce9a35a5bb60a09ee846f9d7070352

Bug: 379111283
Change-Id: I376f38e1555cc6e906d852f6e63dc1c8f6331b4f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/534701
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: fix saving of fetch times and local state</title>
<updated>2025-10-20T18:28:21+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2025-10-20T18:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1afe96a7e997ce7748f066b206a85ac648f7a87c'/>
<id>urn:sha1:1afe96a7e997ce7748f066b206a85ac648f7a87c</id>
<content type='text'>
Interleaved sync didn't save _fetch_times and _local_sync_state to disk.
Phased sync saved them, but incorrectly applied moving average smoothing
repeatedly when fetching submodules, and discarded historical data
during partial syncs.

Move .Save() calls to the end of main sync loops to ensure they run
once. Update _FetchTimes.Save() to merge new data with existing history,
preventing data loss.

Change-Id: I174f98a62ac86859f1eeea1daba65eb35c227852
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/519821
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
</feed>
