misc: fix cloning a project from a subdirectory (#45046)

This commit is contained in:
Frédéric Péters 2020-07-11 15:41:22 +02:00
parent d5636c45e2
commit 14ef685427
1 changed files with 1 additions and 2 deletions

View File

@ -440,7 +440,6 @@ def get_git_branch_name(project_reference):
def setup_git_tree(project_reference, options):
project_name = get_git_project_name(project_reference)
git_project_path = get_git_project_path(project_reference)
if options.branch and options.branch.startswith('wip/'):
if os.path.exists(git_project_path):
@ -465,7 +464,7 @@ def setup_git_tree(project_reference, options):
else:
parsed = urllib.parse.urlparse(project_reference)
if not parsed.netloc:
project_url = urllib.parse.urljoin(settings.GIT_REPOSITORY_URL, project_name) + '.git'
project_url = urllib.parse.urljoin(settings.GIT_REPOSITORY_URL, project_reference) + '.git'
else:
project_url = project_reference
call("git clone %s" % project_url)