This commit is contained in:
Matthew Honnibal 2020-09-20 16:31:48 +02:00
parent dc22771f87
commit 8fb59d958c
2 changed files with 6 additions and 3 deletions

View File

@ -350,7 +350,10 @@ def git_sparse_checkout(repo, subpath, dest, branch):
# We're using Git and sparse checkout to only clone the files we need
with make_tempdir() as tmp_dir:
# This is the "clone, but don't download anything" part.
cmd = f"git clone {repo} {tmp_dir} --no-checkout --depth 1 " f"-b {branch} --filter=blob:none"
cmd = (
f"git clone {repo} {tmp_dir} --no-checkout --depth 1 "
f"-b {branch} --filter=blob:none"
)
run_command(cmd)
# Now we need to find the missing filenames for the subpath we want.
# Looking for this 'rev-list' command in the git --help? Hah.