Shallow clone specific branch

This allows one to say `./utils/update-checkout --clone --skip-history --scheme swift-3.1-branch`. This would otherwise fail, as it would do a shallow clone of master, which doesn't contain `swift-3.1-branch`.
This commit is contained in:
Bouke Haarsma
2017-04-17 20:37:39 +02:00
committed by GitHub
parent c158056d1e
commit 08a69d91f3

View File

@@ -220,7 +220,7 @@ def obtain_additional_swift_sources(pool_args):
print("Cloning '" + repo_name + "'")
if skip_history:
shell.run(['git', 'clone', '--recursive', '--depth', '1',
shell.run(['git', 'clone', '--recursive', '--depth', '1', '--branch', repo_branch,
remote, repo_name], echo=True)
else:
shell.run(['git', 'clone', '--recursive', remote,