mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-01-12 17:40:52 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
871e4c7ed1 | ||
|
|
5b0b5513d6 |
@@ -2579,7 +2579,7 @@ class Project:
|
||||
effective_depth = (
|
||||
self.clone_depth or self.manifest.manifestProject.depth
|
||||
)
|
||||
if effective_depth == 1:
|
||||
if effective_depth == 1 and git_require((2, 23, 0)):
|
||||
cmd.append("--no-auto-gc")
|
||||
|
||||
if not verbose:
|
||||
|
||||
@@ -1437,6 +1437,12 @@ later is required to fix a server side protocol bug.
|
||||
run 'git count-objects -v' and warn if the repository is accumulating
|
||||
excessive pack files or garbage.
|
||||
"""
|
||||
# We only care about bloated projects if we have a git version that
|
||||
# supports --no-auto-gc (2.23.0+) since what we use to disable auto-gc
|
||||
# in Project._RemoteFetch.
|
||||
if not git_require((2, 23, 0)):
|
||||
return
|
||||
|
||||
projects = [p for p in projects if p.clone_depth]
|
||||
if not projects:
|
||||
return
|
||||
@@ -2104,7 +2110,8 @@ later is required to fix a server side protocol bug.
|
||||
"experience, sync the entire tree."
|
||||
)
|
||||
|
||||
self._CheckForBloatedProjects(all_projects, opt)
|
||||
if existing:
|
||||
self._CheckForBloatedProjects(all_projects, opt)
|
||||
|
||||
if not opt.quiet:
|
||||
print("repo sync has finished successfully.")
|
||||
|
||||
Reference in New Issue
Block a user