Page MenuHomePhabricator

D14813.id35813.diff
No OneTemporary

D14813.id35813.diff

diff --git a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
--- a/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
+++ b/src/applications/diffusion/engine/DiffusionCommitHookEngine.php
@@ -407,7 +407,10 @@
if (preg_match('(^refs/heads/)', $ref_raw)) {
$ref_type = PhabricatorRepositoryPushLog::REFTYPE_BRANCH;
$ref_raw = substr($ref_raw, strlen('refs/heads/'));
- } else if (preg_match('(^refs/tags/)', $ref_raw)) {
+ } elseif (preg_match('(^refs/changes/)', $ref_raw)) {
+ $ref_type = PhabricatorRepositoryPushLog::REFTYPE_BRANCH;
+ $ref_raw = substr($ref_raw, strlen('refs/changes/'));
+ } elseif (preg_match('(^refs/tags/)', $ref_raw)) {
$ref_type = PhabricatorRepositoryPushLog::REFTYPE_TAG;
$ref_raw = substr($ref_raw, strlen('refs/tags/'));
} else {
diff --git a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php
--- a/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php
+++ b/src/applications/diffusion/query/lowlevel/DiffusionLowLevelGitRefQuery.php
@@ -31,6 +31,9 @@
if ($this->isOriginBranch) {
if ($repository->isWorkingCopyBare()) {
+ $prefix = 'refs/changes/';
+ }
+ if ($repository->isWorkingCopyBare()) {
$prefix = 'refs/heads/';
} else {
$remote = DiffusionGitBranch::DEFAULT_GIT_REMOTE;
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
@@ -313,7 +313,10 @@
// For bare working copies, we need this magic incantation.
$future = $repository->getRemoteCommandFuture(
'fetch origin %s --prune',
- '+refs/heads/*:refs/heads/*');
+ '+refs/heads/*:refs/heads/*',
+ '+refs/changes/*:refs/changes/*',
+ '+refs/meta/*:refs/meta/*'
+ );
} else {
$future = $repository->getRemoteCommandFuture(
'fetch --all --prune');

File Metadata

Mime Type
text/plain
Expires
Wed, May 15, 10:58 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6296300
Default Alt Text
D14813.id35813.diff (2 KB)

Event Timeline