Page MenuHomePhabricator

D21518.diff
No OneTemporary

D21518.diff

diff --git a/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php b/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
@@ -344,8 +344,7 @@
$this->markPositionNew($new_position);
}
- $diffusion_ref = head($refs)->newDiffusionRepositoryRef();
- if ($publisher->isPermanentRef($diffusion_ref)) {
+ if ($publisher->isPermanentRef(head($refs))) {
// See T13284. If this cursor was already marked as permanent, we
// only need to publish the newly created ref positions. However, if
@@ -613,13 +612,17 @@
$ref_type,
$ref_name) {
- $is_permanent = $this->isPermanentRef($ref_type, $ref_name);
-
$cursor = id(new PhabricatorRepositoryRefCursor())
->setRepositoryPHID($repository->getPHID())
->setRefType($ref_type)
- ->setRefName($ref_name)
- ->setIsPermanent((int)$is_permanent);
+ ->setRefName($ref_name);
+
+ $publisher = $repository->newPublisher();
+
+ $diffusion_ref = $cursor->newDiffusionRepositoryRef();
+ $is_permanent = $publisher->isPermanentRef($diffusion_ref);
+
+ $cursor->setIsPermanent((int)$is_permanent);
try {
return $cursor->save();

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 2:25 PM (19 h, 30 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918529
Default Alt Text
D21518.diff (1 KB)

Event Timeline