Add a --depth option to repo init.
Change-Id: Id30fb4a85f4f8a1847420b0b51a86060041eb5bf
This commit is contained in:
parent
d6c93a28ca
commit
30d452905f
2 changed files with 31 additions and 0 deletions
|
@ -1370,6 +1370,13 @@ class Project(object):
|
|||
ref_dir = None
|
||||
|
||||
cmd = ['fetch']
|
||||
|
||||
# The --depth option only affects the initial fetch; after that we'll do
|
||||
# full fetches of changes.
|
||||
depth = self.manifest.manifestProject.config.GetString('repo.depth')
|
||||
if depth and initial:
|
||||
cmd.append('--depth=%s' % depth)
|
||||
|
||||
if quiet:
|
||||
cmd.append('--quiet')
|
||||
if not self.worktree:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue