Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | $arguments = array( | ||||
'conflicts' => array( | 'conflicts' => array( | ||||
'edit' => pht('%s does affect revisions.', '--only'), | 'edit' => pht('%s does affect revisions.', '--only'), | ||||
'message' => pht('%s does not update any revision.', '--only'), | 'message' => pht('%s does not update any revision.', '--only'), | ||||
), | ), | ||||
), | ), | ||||
'allow-untracked' => array( | 'allow-untracked' => array( | ||||
'help' => pht('Skip checks for untracked files in the working copy.'), | 'help' => pht('Skip checks for untracked files in the working copy.'), | ||||
), | ), | ||||
'amend-all' => array( | |||||
'help' => pht( | |||||
'When linting git repositories, amend HEAD with all patches '. | |||||
'suggested by lint without prompting.'), | |||||
'passthru' => array( | |||||
'lint' => true, | |||||
), | |||||
), | |||||
'amend-autofixes' => array( | |||||
'help' => pht( | |||||
'When linting git repositories, amend HEAD with autofix '. | |||||
'patches suggested by lint without prompting.'), | |||||
'passthru' => array( | |||||
'lint' => true, | |||||
), | |||||
), | |||||
'add-all' => array( | 'add-all' => array( | ||||
'short' => 'a', | 'short' => 'a', | ||||
'help' => pht( | 'help' => pht( | ||||
'Automatically add all unstaged and uncommitted '. | 'Automatically add all unstaged and uncommitted '. | ||||
'files to the commit.'), | 'files to the commit.'), | ||||
), | ), | ||||
'json' => array( | 'json' => array( | ||||
'help' => pht( | 'help' => pht( | ||||
'Emit machine-readable JSON. EXPERIMENTAL! Probably does not work!'), | 'Emit machine-readable JSON. EXPERIMENTAL! Probably does not work!'), | ||||
), | ), | ||||
'no-amend' => array( | |||||
'help' => pht( | |||||
'Never amend commits in the working copy with lint patches.'), | |||||
), | |||||
'uncommitted' => array( | 'uncommitted' => array( | ||||
'help' => pht('Suppress warning about uncommitted changes.'), | 'help' => pht('Suppress warning about uncommitted changes.'), | ||||
'supports' => array( | 'supports' => array( | ||||
'hg', | 'hg', | ||||
), | ), | ||||
), | ), | ||||
'verbatim' => array( | 'verbatim' => array( | ||||
'help' => pht( | 'help' => pht( | ||||
▲ Show 20 Lines • Show All 835 Lines • ▼ Show 20 Lines | protected function primeSubversionWorkingCopyData($paths) { | ||||
} | } | ||||
} | } | ||||
private function shouldAmend() { | private function shouldAmend() { | ||||
if ($this->isRawDiffSource()) { | if ($this->isRawDiffSource()) { | ||||
return false; | return false; | ||||
} | } | ||||
if ($this->getArgument('no-amend')) { | |||||
return false; | |||||
} | |||||
if ($this->getArgument('head') !== null) { | if ($this->getArgument('head') !== null) { | ||||
return false; | return false; | ||||
} | } | ||||
// Run this last: with --raw or --raw-command, we won't have a repository | // Run this last: with --raw or --raw-command, we won't have a repository | ||||
// API. | // API. | ||||
if ($this->isHistoryImmutable()) { | if ($this->isHistoryImmutable()) { | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 1,764 Lines • Show Last 20 Lines |