Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
Show First 20 Lines • Show All 1,002 Lines • ▼ Show 20 Lines | if ($unstaged || $uncommitted) { | ||||
$all_uncommitted = array_merge($unstaged, $uncommitted); | $all_uncommitted = array_merge($unstaged, $uncommitted); | ||||
if ($this->askForAdd($all_uncommitted)) { | if ($this->askForAdd($all_uncommitted)) { | ||||
if ($unstaged) { | if ($unstaged) { | ||||
$api->addToCommit($unstaged); | $api->addToCommit($unstaged); | ||||
} | } | ||||
$should_commit = true; | $should_commit = true; | ||||
} else { | } else { | ||||
$permit_autostash = $this->getConfigFromAnySource( | $permit_autostash = $this->getConfigFromAnySource('arc.autostash'); | ||||
'arc.autostash', | |||||
false); | |||||
if ($permit_autostash && $api->canStashChanges()) { | if ($permit_autostash && $api->canStashChanges()) { | ||||
echo pht( | echo pht( | ||||
'Stashing uncommitted changes. (You can restore them with `%s`).', | 'Stashing uncommitted changes. (You can restore them with `%s`).', | ||||
'git stash pop')."\n"; | 'git stash pop')."\n"; | ||||
$api->stashChanges(); | $api->stashChanges(); | ||||
$this->stashed = true; | $this->stashed = true; | ||||
} else { | } else { | ||||
throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
▲ Show 20 Lines • Show All 1,053 Lines • Show Last 20 Lines |