From 112c9e6b5e089d06f7746c9c7c6c100f5f85e221 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 13 May 2014 13:52:03 -0700 Subject: [PATCH] Rename "commitType" to "symbolicType" Summary: Ref T2683. The old name was a bit confusing because it meant "the type of the thing the symbol represents": a "commit type" should logically always be "commit". (Currently, this is only used to detect when we're looking at a tag.) Test Plan: Looked at a tag. Looked at some other non-tag things. Browsed around, `grep`. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T2683 Differential Revision: https://secure.phabricator.com/D9092 --- .../controller/DiffusionBrowseController.php | 2 +- .../diffusion/request/DiffusionRequest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 26f2ab952a..64cf276be6 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -157,7 +157,7 @@ abstract class DiffusionBrowseController extends DiffusionController { ), $drequest->getRepository()->formatCommitName($stable_commit))); - if ($drequest->getCommitType() == 'tag') { + if ($drequest->getSymbolicType() == 'tag') { $symbolic = $drequest->getSymbolicCommit(); $view->addProperty(pht('Tag'), $symbolic); diff --git a/src/applications/diffusion/request/DiffusionRequest.php b/src/applications/diffusion/request/DiffusionRequest.php index 6cbcfe0617..db64e1841c 100644 --- a/src/applications/diffusion/request/DiffusionRequest.php +++ b/src/applications/diffusion/request/DiffusionRequest.php @@ -16,11 +16,11 @@ abstract class DiffusionRequest { protected $path; protected $line; protected $commit; - protected $commitType = 'commit'; protected $branch; protected $lint; protected $symbolicCommit; + protected $symbolicType; protected $stableCommit; protected $repository; @@ -244,6 +244,10 @@ abstract class DiffusionRequest { return $this->symbolicCommit; } + public function getSymbolicType() { + return $this->symbolicType; + } + public function getBranch() { return $this->branch; } @@ -630,11 +634,7 @@ abstract class DiffusionRequest { $match = head($matches); $this->commit = $match['identifier']; - $this->commitType = $match['type']; - } - - public function getCommitType() { - return $this->commitType; + $this->symbolicType = $match['type']; } private function queryStableCommit() {