Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14023363
D14971.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D14971.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 1:16 AM (5 d, 1 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6733425
Default Alt Text
D14971.diff (1 KB)
Attached To
Mode
D14971: Improve error message if local Git working copy directory exists but isn't a working copy
Attached
Detach File
Event Timeline
Log In to Comment