mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
Merge "Only fetch current branch on shallow clients"
This commit is contained in:
commit
c9877c7cf6
11
project.py
11
project.py
@ -1661,6 +1661,13 @@ class Project(object):
|
|||||||
# There is no such persistent revision. We have to fetch it.
|
# There is no such persistent revision. We have to fetch it.
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if self.clone_depth:
|
||||||
|
depth = self.clone_depth
|
||||||
|
else:
|
||||||
|
depth = self.manifest.manifestProject.config.GetString('repo.depth')
|
||||||
|
if depth:
|
||||||
|
current_branch_only = True
|
||||||
|
|
||||||
if current_branch_only:
|
if current_branch_only:
|
||||||
if ID_RE.match(self.revisionExpr) is not None:
|
if ID_RE.match(self.revisionExpr) is not None:
|
||||||
is_sha1 = True
|
is_sha1 = True
|
||||||
@ -1724,10 +1731,6 @@ class Project(object):
|
|||||||
|
|
||||||
# The --depth option only affects the initial fetch; after that we'll do
|
# The --depth option only affects the initial fetch; after that we'll do
|
||||||
# full fetches of changes.
|
# full fetches of changes.
|
||||||
if self.clone_depth:
|
|
||||||
depth = self.clone_depth
|
|
||||||
else:
|
|
||||||
depth = self.manifest.manifestProject.config.GetString('repo.depth')
|
|
||||||
if depth and initial:
|
if depth and initial:
|
||||||
cmd.append('--depth=%s' % depth)
|
cmd.append('--depth=%s' % depth)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user