Summary:
In D1079, I added "--color never", but this flag is provided by the "color"
extension, which is why I missed it originally, because it doesn't show up until
you enable that extension. Providing it causes installs which don't have it
enabled (disabled is the default) to fail.
Use "--config" to disable color instead. This sets a configuration setting and
works regardless of whether the color extension is present.
Test Plan: Ran "arc diff" in a mercurial working copy with the color extension
enabled and disabled.
Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran
Reviewed By: nh
CC: aran, nh
Differential Revision: 1092
private function getDiffOptions() {
$options = array(
'--git',
- '--color never',
+ // NOTE: We can't use "--color never" because that flag is provided
+ // by the color extension, which may or may not be enabled. Instead,
+ // set the color mode configuration so that color is disabled regardless
+ // of whether the extension is present or not.
+ '--config color.mode=off',
'-U'.$this->getDiffLinesOfContext(),
);
return implode(' ', $options);