summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-06-03 11:24:30 -0700
committerDavid Pursehouse <dpursehouse@collab.net>2019-07-16 00:23:16 +0000
commit745be2ede1e67421275afc00c04d996d9d6908ee (patch)
tree6b7bfbd187a33eeeb14108518ece5440ce9456c0 /repo
parent87fb5a1894354ec0e34ccec427a9803e24157847 (diff)
downloadgit-repo-745be2ede1e67421275afc00c04d996d9d6908ee.tar.gz
Add support for partial clone.v1.13.4
A new option, --partial-clone is added to 'repo init' which tells repo to utilize git's partial clone functionality, which reduces disk and bandwidth usage when downloading by omitting blob downloads initially. Different from restricting clone-depth, the user will have full access to change history, etc., as the objects are downloaded on demand. Change-Id: I60326744875eac16521a007bd7d5481112a98749 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/229532 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Xin Li <delphij@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-xrepo7
1 files changed, 7 insertions, 0 deletions
diff --git a/repo b/repo
index 8ed147df..649c4e48 100755
--- a/repo
+++ b/repo
@@ -199,6 +199,13 @@ group.add_option('--dissociate',
199group.add_option('--depth', type='int', default=None, 199group.add_option('--depth', type='int', default=None,
200 dest='depth', 200 dest='depth',
201 help='create a shallow clone with given depth; see git clone') 201 help='create a shallow clone with given depth; see git clone')
202group.add_option('--partial-clone', action='store_true',
203 dest='partial_clone',
204 help='perform partial clone (https://git-scm.com/'
205 'docs/gitrepository-layout#_code_partialclone_code)')
206group.add_option('--clone-filter', action='store', default='blob:none',
207 dest='clone_filter',
208 help='filter for use with --partial-clone [default: %default]')
202group.add_option('--archive', 209group.add_option('--archive',
203 dest='archive', action='store_true', 210 dest='archive', action='store_true',
204 help='checkout an archive instead of a git repository for ' 211 help='checkout an archive instead of a git repository for '