Make Phabricator clone bare git repositories
Summary: This doesn't really impact anything very much, but is a little cleaner than cloning repositories with a working copy. It's somewhat important for allowing pushes, because you can't push to a checked-out branch. Mercurial has a similar option (`--noupdate`) but leave that alone for now. The origin stuff was mostly for sanity/explicitness purposes -- I believe it's safe to remove in all non-ridiculous cases. Git fails with it in bare repositories (it automatically creates an `origin`, but doesn't create the local refs for it, or something). Test Plan: Nuked a repo, re-cloned it, pulled and updated it several times. Browsed both bare and non-bare repos in Diffusion. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2230 Differential Revision: https://secure.phabricator.com/D7430
This commit is contained in:
@@ -40,6 +40,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
}
|
||||
}
|
||||
}
|
||||
$history_exception = null;
|
||||
} catch (Exception $ex) {
|
||||
$history_results = null;
|
||||
$history = null;
|
||||
@@ -68,6 +69,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
}
|
||||
}
|
||||
|
||||
$browse_exception = null;
|
||||
} catch (Exception $ex) {
|
||||
$browse_results = null;
|
||||
$browse_paths = null;
|
||||
|
||||
@@ -37,8 +37,12 @@ final class DiffusionRepositoryEditBranchesController
|
||||
$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');
|
||||
|
||||
Reference in New Issue
Block a user