Page MenuHomePhabricator

D8888.id21110.diff
No OneTemporary

D8888.id21110.diff

diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php
--- a/src/workflow/ArcanistBaseWorkflow.php
+++ b/src/workflow/ArcanistBaseWorkflow.php
@@ -1124,10 +1124,10 @@
}
if (empty($this->changeCache[$path])) {
- if ($is_git) {
- // This can legitimately occur under git if you make a change, "git
- // commit" it, and then revert the change in the working copy and run
- // "arc lint".
+ if ($is_git || $is_hg) {
+ // This can legitimately occur under git/hg if you make a change,
+ // "git/hg commit" it, and then revert the change in the working copy
+ // and run "arc lint".
$change = new ArcanistDiffChange();
$change->setCurrentPath($path);
return $change;
diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -394,6 +394,11 @@
'unit' => true,
),
),
+ 'auto-convert-binary' => array(
+ 'help' =>
+ 'Mark file as binary without prompting in case that changes '.
+ 'to a file exceed the size limit.',
+ ),
'*' => 'paths',
);
@@ -999,7 +1004,8 @@
$confirm =
"{$byte_warning} If the file is not a text file, you can ".
"mark it 'binary'. Mark this file as 'binary' and continue?";
- if (phutil_console_confirm($confirm)) {
+ if ($this->getArgument('auto-convert-binary') ||
+ phutil_console_confirm($confirm)) {
$change->convertToBinaryChange($repository_api);
} else {
throw new ArcanistUsageException(

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 17, 10:32 PM (4 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708970
Default Alt Text
D8888.id21110.diff (1 KB)

Event Timeline