1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Semi-fix git cloning for non-bare repos for landing

Summary:
If the repo isn't bare, than we need copy it's remote instead of using it.

This will probably not work if an SSH key is provided to phabricator, and in any case you must delete
all workspaces that were already created.

This will make landing those repos slower; I plan to just delete and re-clone all repos on my instance.

It will probably be simpler to just make a bare-repo a requirement of all the git-landing work.

Test Plan: landed from hosted and un-hosted repos, checked git-remote url in each newly cloned workspace.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7592
This commit is contained in:
Aviv Eyal 2013-12-30 15:22:31 -08:00 committed by epriestley
parent da3be5071b
commit 2de96c6f08

View file

@ -24,6 +24,12 @@ final class DifferentialGetWorkingCopy {
'clone -- file://%s %s',
$origin_path,
$path);
if (!$repo->isHosted()) {
id(new ArcanistGitAPI($path))->execxLocal(
'remote set-url origin %s',
$repo->getRemoteURI());
}
}
$workspace = new ArcanistGitAPI($path);