Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistLintWorkflow.php
Show First 20 Lines • Show All 540 Lines • ▼ Show 20 Lines | if ($wrote_to_disk && $this->shouldAmendChanges) { | ||||
if ($this->shouldAmendWithoutPrompt || | if ($this->shouldAmendWithoutPrompt || | ||||
($this->shouldAmendAutofixesWithoutPrompt && $all_autofix)) { | ($this->shouldAmendAutofixesWithoutPrompt && $all_autofix)) { | ||||
$console->writeOut( | $console->writeOut( | ||||
"<bg:yellow>** %s **</bg> %s\n", | "<bg:yellow>** %s **</bg> %s\n", | ||||
pht('LINT NOTICE'), | pht('LINT NOTICE'), | ||||
pht('Automatically amending HEAD with lint patches.')); | pht('Automatically amending HEAD with lint patches.')); | ||||
$amend = true; | $amend = true; | ||||
} else { | } else { | ||||
$amend = phutil_console_confirm(pht('Amend HEAD with lint patches?')); | $amend = phutil_console_confirm(pht('Amend HEAD with lint patches?'), | ||||
false); | |||||
} | } | ||||
if ($amend) { | if ($amend) { | ||||
if ($repository_api instanceof ArcanistGitAPI) { | if ($repository_api instanceof ArcanistGitAPI) { | ||||
// Add the changes to the index before amending | // Add the changes to the index before amending | ||||
$repository_api->execxLocal('add -u'); | $repository_api->execxLocal('add -u'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |