bootstrap: don't check that src is a URL in clone()

Git clone can take a raw file system path instead of a URL when
cloning a repository that is already available locally somewhere else.

When this happens, git tries to use hard links to create the files in
the destination, which is more efficient, so the limitation to URLs is
not good. Remove it.

Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
Marti Bolivar 2019-01-04 15:05:46 -07:00
parent dbe6ebbc9b
commit b3651495e3
1 changed files with 0 additions and 4 deletions

View File

@ -110,10 +110,6 @@ def clone(desc, url, rev, dest):
if os.path.exists(dest):
raise WestError('refusing to clone into existing location ' + dest)
if not url.startswith(('http:', 'https:', 'git:', 'git+ssh:', 'file:',
'git@')):
raise WestError('Unknown URL scheme for repository: {}'.format(url))
print('=== Cloning {} from {}, rev. {} ==='.format(desc, url, rev))
subprocess.check_call(('git', 'clone', '-b', rev, '--', url, dest))