Allow Git and Mercurial repositories to be cloned with names in the URI
Summary: Ref T4175. This allows these URIs to all be valid for Git and Mercurial: /diffusion/X/ /diffusion/X/anything.git /diffusion/X/anything/ This mostly already works, it just needed a few tweaks. Test Plan: Cloned git and hg working copies using HTTP and SSH. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T4175 Differential Revision: https://secure.phabricator.com/D8098
This commit is contained in:
@@ -551,15 +551,13 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
switch ($repository->getVersionControlSystem()) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$command = csprintf(
|
||||
'git clone %s %s',
|
||||
$uri,
|
||||
$repository->getCloneName());
|
||||
'git clone %s',
|
||||
$uri);
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$command = csprintf(
|
||||
'hg clone %s %s',
|
||||
$uri,
|
||||
$repository->getCloneName());
|
||||
'hg clone %s',
|
||||
$uri);
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$command = csprintf(
|
||||
|
||||
Reference in New Issue
Block a user