Index: src/applications/diffusion/controller/DiffusionRepositoryController.php =================================================================== --- src/applications/diffusion/controller/DiffusionRepositoryController.php +++ 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; Index: src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php =================================================================== --- src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php +++ 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'); Index: src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php =================================================================== --- src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php +++ 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); Index: src/applications/diffusion/request/DiffusionGitRequest.php =================================================================== --- src/applications/diffusion/request/DiffusionGitRequest.php +++ 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(); } } Index: src/applications/repository/engine/PhabricatorRepositoryPullEngine.php =================================================================== --- src/applications/repository/engine/PhabricatorRepositoryPullEngine.php +++ 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 = Index: src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php =================================================================== --- src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php +++ 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() {