Changeset View
Changeset View
Standalone View
Standalone View
src/repository/state/ArcanistGitLocalState.php
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | protected function executeRestoreLocalState() { | ||||
$api->execxLocal('submodule update --init --recursive'); | $api->execxLocal('submodule update --init --recursive'); | ||||
} | } | ||||
protected function executeDiscardLocalState() { | protected function executeDiscardLocalState() { | ||||
// We don't have anything to clean up in Git. | // We don't have anything to clean up in Git. | ||||
return; | return; | ||||
} | } | ||||
protected function newRestoreCommandsForDisplay() { | |||||
$ref = $this->localRef; | |||||
$commit = $this->localCommit; | |||||
$commands = array(); | |||||
if ($ref !== null) { | |||||
$commands[] = csprintf( | |||||
'git checkout -B %s %s --', | |||||
$ref, | |||||
$this->getDisplayHash($commit)); | |||||
} else { | |||||
$commands[] = csprintf( | |||||
'git checkout %s --', | |||||
$this->getDisplayHash($commit)); | |||||
} | |||||
// NOTE: We run "submodule update" in the real restore workflow, but | |||||
// assume users can reasonably figure that out on their own. | |||||
return $commands; | |||||
} | |||||
protected function canStashChanges() { | protected function canStashChanges() { | ||||
return true; | return true; | ||||
} | } | ||||
protected function getIgnoreHints() { | protected function getIgnoreHints() { | ||||
return array( | return array( | ||||
pht( | pht( | ||||
'To configure Git to ignore certain files in this working copy, '. | 'To configure Git to ignore certain files in this working copy, '. | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |