diff options
author | Doug Anderson <dianders@chromium.org> | 2011-05-04 15:01:04 -0700 |
---|---|---|
committer | Doug Anderson <dianders@chromium.org> | 2011-06-09 16:48:23 -0700 |
commit | 30d452905f166b316152f236422f85c8aa75a2d0 (patch) | |
tree | cc6a18adb2ea8c0f209f21aca2e64fe20fb06005 /project.py | |
parent | d6c93a28ca8cb079f473f749d805dcff97990225 (diff) | |
download | git-repo-30d452905f166b316152f236422f85c8aa75a2d0.tar.gz |
Add a --depth option to repo init.v1.7.5
Change-Id: Id30fb4a85f4f8a1847420b0b51a86060041eb5bf
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1370,6 +1370,13 @@ class Project(object): | |||
1370 | ref_dir = None | 1370 | ref_dir = None |
1371 | 1371 | ||
1372 | cmd = ['fetch'] | 1372 | cmd = ['fetch'] |
1373 | |||
1374 | # The --depth option only affects the initial fetch; after that we'll do | ||
1375 | # full fetches of changes. | ||
1376 | depth = self.manifest.manifestProject.config.GetString('repo.depth') | ||
1377 | if depth and initial: | ||
1378 | cmd.append('--depth=%s' % depth) | ||
1379 | |||
1373 | if quiet: | 1380 | if quiet: |
1374 | cmd.append('--quiet') | 1381 | cmd.append('--quiet') |
1375 | if not self.worktree: | 1382 | if not self.worktree: |