mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-01-17 03:51:12 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
622a5bf9c2 | ||
|
|
871e4c7ed1 | ||
|
|
5b0b5513d6 |
@@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
|
||||
.TH REPO "1" "September 2024" "repo init" "Repo Manual"
|
||||
.TH REPO "1" "December 2025" "repo init" "Repo Manual"
|
||||
.SH NAME
|
||||
repo \- repo init - manual page for repo init
|
||||
.SH SYNOPSIS
|
||||
@@ -53,7 +53,7 @@ create a git checkout of the manifest repo
|
||||
.TP
|
||||
\fB\-\-manifest\-depth\fR=\fI\,DEPTH\/\fR
|
||||
create a shallow clone of the manifest repo with given
|
||||
depth (0 for full clone); see git clone (default: 0)
|
||||
depth (0 for full clone); see git clone (default: 1)
|
||||
.SS Manifest (only) checkout options:
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-current\-branch\fR
|
||||
|
||||
@@ -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:
|
||||
|
||||
4
repo
4
repo
@@ -129,7 +129,7 @@ if not REPO_REV:
|
||||
BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071"
|
||||
|
||||
# increment this whenever we make important changes to this script
|
||||
VERSION = (2, 54)
|
||||
VERSION = (2, 61)
|
||||
|
||||
# increment this if the MAINTAINER_KEYS block is modified
|
||||
KEYRING_VERSION = (2, 3)
|
||||
@@ -325,7 +325,7 @@ def InitParser(parser):
|
||||
group.add_option(
|
||||
"--manifest-depth",
|
||||
type="int",
|
||||
default=0,
|
||||
default=1,
|
||||
metavar="DEPTH",
|
||||
help="create a shallow clone of the manifest repo with "
|
||||
"given depth (0 for full clone); see git clone "
|
||||
|
||||
@@ -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