Page MenuHomePhabricator

D14971.diff
No OneTemporary

D14971.diff

diff --git a/src/applications/repository/engine/PhabricatorRepositoryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryEngine.php
@@ -62,8 +62,21 @@
* @return void
*/
protected function verifyGitOrigin(PhabricatorRepository $repository) {
- list($remotes) = $repository->execxLocalCommand(
- 'remote show -n origin');
+ try {
+ list($remotes) = $repository->execxLocalCommand(
+ 'remote show -n origin');
+ } catch (CommandException $ex) {
+ throw new PhutilProxyException(
+ pht(
+ 'Expected to find a Git working copy at path "%s", but the '.
+ 'path exists and is not a valid working copy. If you remove '.
+ 'this directory, the daemons will automatically recreate it '.
+ 'correctly. Phabricator will not destroy the directory for you '.
+ 'because it can not be sure that it does not contain important '.
+ 'data.',
+ $repository->getLocalPath()),
+ $ex);
+ }
$matches = null;
if (!preg_match('/^\s*Fetch URL:\s*(.*?)\s*$/m', $remotes, $matches)) {

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 21, 11:30 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733425
Default Alt Text
D14971.diff (1 KB)

Event Timeline