mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
When repairing Git remote URIs, include credentials
Summary: See IRC. Currently, if a fetch fails, we may repair the remote URI incorrectly, replacing it with one without any credentials. Instead, retain credentials. Test Plan: Faked it locally, got le-boom to verify on IRC. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D8055
This commit is contained in:
parent
14f070a0af
commit
c21a8d31dd
1 changed files with 3 additions and 3 deletions
|
@ -303,10 +303,10 @@ final class PhabricatorRepositoryPullEngine
|
||||||
// Fix remote origin url if it doesn't match our configuration
|
// Fix remote origin url if it doesn't match our configuration
|
||||||
$origin_url = $repository->execLocalCommand(
|
$origin_url = $repository->execLocalCommand(
|
||||||
'config --get remote.origin.url');
|
'config --get remote.origin.url');
|
||||||
$remote_uri = $repository->getDetail('remote-uri');
|
$remote_uri = $repository->getRemoteURIEnvelope();
|
||||||
if ($origin_url != $remote_uri) {
|
if ($origin_url != $remote_uri->openEnvelope()) {
|
||||||
$repository->execLocalCommand(
|
$repository->execLocalCommand(
|
||||||
'remote set-url origin %s',
|
'remote set-url origin %P',
|
||||||
$remote_uri);
|
$remote_uri);
|
||||||
}
|
}
|
||||||
} else if ($err) {
|
} else if ($err) {
|
||||||
|
|
Loading…
Reference in a new issue