1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

Use new "%R" escape for csprintf() to produce slightly nicer clone/checkout commands

Summary: Fixes T4175. In cases where the arguments have only always-safe characters, we can produce a more human-readable URI.

Test Plan: Looked at some repositories.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T4175

Differential Revision: https://secure.phabricator.com/D8100
This commit is contained in:
epriestley 2014-01-30 11:42:33 -08:00
parent c41b4cfac0
commit 3bfa54819e

View file

@ -551,17 +551,17 @@ final class DiffusionRepositoryController extends DiffusionController {
switch ($repository->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
$command = csprintf(
'git clone %s',
'git clone %R',
$uri);
break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
$command = csprintf(
'hg clone %s',
'hg clone %R',
$uri);
break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
$command = csprintf(
'svn checkout %s %s',
'svn checkout %R %R',
$uri,
$repository->getCloneName());
break;