Changeset View
Changeset View
Standalone View
Standalone View
src/repository/state/ArcanistGitLocalState.php
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | protected function executeSaveLocalState() { | ||||
| } | } | ||||
| $log = $this->getWorkflow()->getLogEngine(); | $log = $this->getWorkflow()->getLogEngine(); | ||||
| $log->writeTrace(pht('SAVE STATE'), $where); | $log->writeTrace(pht('SAVE STATE'), $where); | ||||
| } | } | ||||
| protected function executeRestoreLocalState() { | protected function executeRestoreLocalState() { | ||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| $log = $this->getWorkflow()->getLogEngine(); | $log = $this->getWorkflow()->getLogEngine(); | ||||
| $ref = $this->localRef; | $ref = $this->localRef; | ||||
| $commit = $this->localCommit; | $commit = $this->localCommit; | ||||
| if ($ref !== null) { | if ($ref !== null) { | ||||
| $where = pht( | $where = pht( | ||||
| 'Restoring local state (to ref "%s" at commit "%s").', | 'Restoring local state (to ref "%s" at commit "%s").', | ||||
| ▲ Show 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | protected function discardStash($stash_ref) { | ||||
| // NOTE: Under Git 2.21.1, "git stash drop" does not accept "--". | // NOTE: Under Git 2.21.1, "git stash drop" does not accept "--". | ||||
| $api->execxLocal('stash drop'); | $api->execxLocal('stash drop'); | ||||
| } | } | ||||
| private function getDisplayStashRef($stash_ref) { | private function getDisplayStashRef($stash_ref) { | ||||
| return substr($stash_ref, 0, 12); | return substr($stash_ref, 0, 12); | ||||
| } | } | ||||
| private function getDisplayHash($hash) { | |||||
| return substr($hash, 0, 12); | |||||
| } | |||||
| } | } | ||||