Page MenuHomePhabricator

D15878.id38244.diff
No OneTemporary

D15878.id38244.diff

diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
--- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
+++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelResolveRefsQuery.php
@@ -31,6 +31,11 @@
return array();
}
+ $repository = $this->getRepository();
+ if (!$repository->hasLocalWorkingCopy()) {
+ return array();
+ }
+
switch ($this->getRepository()->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
$result = $this->resolveGitRefs();
diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -1477,6 +1477,15 @@
return false;
}
+ public function hasLocalWorkingCopy() {
+ try {
+ self::assertLocalExists();
+ return true;
+ } catch (Exception $ex) {
+ return false;
+ }
+ }
+
/**
* Raise more useful errors when there are basic filesystem problems.
*/

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 14, 9:45 PM (4 d, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6724930
Default Alt Text
D15878.id38244.diff (1 KB)

Event Timeline