Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15475922
D7430.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D7430.diff
View Options
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() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 8, 1:08 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7723886
Default Alt Text
D7430.diff (4 KB)
Attached To
Mode
D7430: Make Phabricator clone bare git repositories
Attached
Detach File
Event Timeline
Log In to Comment