From 30d452905f166b316152f236422f85c8aa75a2d0 Mon Sep 17 00:00:00 2001 From: Doug Anderson Date: Wed, 4 May 2011 15:01:04 -0700 Subject: Add a --depth option to repo init. Change-Id: Id30fb4a85f4f8a1847420b0b51a86060041eb5bf --- project.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'project.py') diff --git a/project.py b/project.py index e5dbf25e..9d67dead 100644 --- a/project.py +++ b/project.py @@ -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: -- cgit v1.2.3-54-g00ecf