Page MenuHomePhabricator

D7430.diff

diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -40,6 +40,7 @@
}
}
}
+ $history_exception = null;
} catch (Exception $ex) {
$history_results = null;
$history = null;
@@ -68,6 +69,7 @@
}
}
+ $browse_exception = null;
} catch (Exception $ex) {
$browse_results = null;
$browse_paths = null;
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
@@ -37,8 +37,12 @@
$edit_uri = $this->getRepositoryControllerURI($repository, 'edit/');
$v_default = $repository->getHumanReadableDetail('default-branch');
- $v_track = $repository->getHumanReadableDetail('branch-filter');
- $v_autoclose = $repository->getHumanReadableDetail('close-commits-filter');
+ $v_track = $repository->getHumanReadableDetail(
+ 'branch-filter',
+ array());
+ $v_autoclose = $repository->getHumanReadableDetail(
+ 'close-commits-filter',
+ array());
if ($request->isFormPost()) {
$v_default = $request->getStr('default');
diff --git a/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php b/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
--- a/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
+++ b/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
@@ -7,8 +7,7 @@
$repository = $this->getRepository();
$branch = $this->getBranch();
list($stdout) = $repository->execxLocalCommand(
- 'rev-parse --verify %s/%s',
- DiffusionBranchInformation::DEFAULT_GIT_REMOTE,
+ 'rev-parse --verify %s',
$branch);
$commit = trim($stdout);
diff --git a/src/applications/diffusion/request/DiffusionGitRequest.php b/src/applications/diffusion/request/DiffusionGitRequest.php
--- a/src/applications/diffusion/request/DiffusionGitRequest.php
+++ b/src/applications/diffusion/request/DiffusionGitRequest.php
@@ -31,8 +31,7 @@
if ($this->commit) {
return $this->commit;
}
- $remote = DiffusionBranchInformation::DEFAULT_GIT_REMOTE;
- return $remote.'/'.$this->getBranch();
+ return $this->getBranch();
}
}
diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
@@ -99,7 +99,7 @@
$repository = $this->getRepository();
$repository->execxRemoteCommand(
- 'clone --origin origin %s %s',
+ 'clone --bare %s %s',
$repository->getRemoteURI(),
rtrim($repository->getLocalPath(), '/'));
}
@@ -149,12 +149,11 @@
$repo_path = rtrim($stdout, "\n");
if (empty($repo_path)) {
- $err = true;
- $message =
- "Expected to find a git repository at '{$path}', but ".
- "there was no result from `git rev-parse --show-toplevel`. ".
- "Something is misconfigured or broken. The git repository ".
- "may be inside a '.git/' directory.";
+ // This can mean one of two things: we're in a bare repository, or
+ // we're inside a git repository inside another git repository. Since
+ // the first is dramatically more likely now that we perform bare
+ // clones and I don't have a great way to test for the latter, assume
+ // we're OK.
} else if (!Filesystem::pathsAreEquivalent($repo_path, $path)) {
$err = true;
$message =
diff --git a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
--- a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
+++ b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
@@ -8,7 +8,7 @@
$this->assertEqual(
true,
- Filesystem::pathExists($repo->getLocalPath().'/.git'));
+ Filesystem::pathExists($repo->getLocalPath().'/HEAD'));
}
public function testHgPullBasic() {

File Metadata

Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/bk/h6/uhlthlmcc7yka4nx
Default Alt Text
D7430.diff (4 KB)

Event Timeline