1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 00:02:40 +01:00

Remove "--encoding" flag from "arc diff"

Summary: Ref T13544. This flag is generally questionable, likely has no actual uses, and is slated for obsoletion and replacement elsewhere (see T13338).

Test Plan: Grepped for "encoding", found no relevant hits.

Maniphest Tasks: T13544

Differential Revision: https://secure.phabricator.com/D21300
This commit is contained in:
epriestley 2020-05-30 15:29:12 -07:00
parent bb81172eb7
commit 466de2d2e1

View file

@ -199,11 +199,6 @@ EOTEXT
'message' => pht('%s does not update any revision.', '--only'), 'message' => pht('%s does not update any revision.', '--only'),
), ),
), ),
'encoding' => array(
'param' => 'encoding',
'help' => pht(
'Attempt to convert non UTF-8 hunks into specified encoding.'),
),
'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.'),
), ),
@ -956,8 +951,6 @@ EOTEXT
} }
} }
$try_encoding = nonempty($this->getArgument('encoding'), null);
$utf8_problems = array(); $utf8_problems = array();
foreach ($changes as $change) { foreach ($changes as $change) {
foreach ($change->getHunks() as $hunk) { foreach ($change->getHunks() as $hunk) {
@ -970,17 +963,15 @@ EOTEXT
$is_binary = ArcanistDiffUtils::isHeuristicBinaryFile($corpus); $is_binary = ArcanistDiffUtils::isHeuristicBinaryFile($corpus);
if (!$is_binary) { if (!$is_binary) {
if (!$try_encoding) { try {
try { $try_encoding = $this->getRepositoryEncoding();
$try_encoding = $this->getRepositoryEncoding(); } catch (ConduitClientException $e) {
} catch (ConduitClientException $e) { if ($e->getErrorCode() == 'ERR-BAD-ARCANIST-PROJECT') {
if ($e->getErrorCode() == 'ERR-BAD-ARCANIST-PROJECT') { echo phutil_console_wrap(
echo phutil_console_wrap( pht('Lookup of encoding in arcanist project failed: %s',
pht('Lookup of encoding in arcanist project failed: %s', $e->getMessage())."\n");
$e->getMessage())."\n"); } else {
} else { throw $e;
throw $e;
}
} }
} }