diff options
-rw-r--r-- | src/cli.rs | 6 | ||||
-rw-r--r-- | src/features/diff_highlight.rs | 6 | ||||
-rw-r--r-- | src/features/raw.rs | 30 |
3 files changed, 33 insertions, 9 deletions
@@ -350,9 +350,9 @@ pub struct Opt { pub line_numbers_right_style: String, #[structopt(long = "raw")] - /// Do not alter the input in any way other than applying colors. Equivalent to - /// `--keep-plus-minus-markers --width variable --tabs 0 --commit-decoration '' - /// --file-decoration '' --hunk-decoration ''`. + /// Do not alter the input in any way. The only exceptions are the coloring of hunk lines: + /// minus lines use color.diff.old (with fallback to "red") and plus lines use color.diff.new + /// (with fallback to "green"). pub raw: bool, #[structopt(long = "no-gitconfig")] diff --git a/src/features/diff_highlight.rs b/src/features/diff_highlight.rs index 1fba29a1..03e9792f 100644 --- a/src/features/diff_highlight.rs +++ b/src/features/diff_highlight.rs @@ -33,12 +33,6 @@ pub fn _make_feature(bold: bool) -> Vec<(String, OptionValueFunction)> { opt => format!("{} reverse", opt.minus_style) ), ( - "zero-style", - String, - None, - _opt => "normal" - ), - ( "plus-style", String, Some("color.diff.new"), diff --git a/src/features/raw.rs b/src/features/raw.rs index 424bf23a..7add6b34 100644 --- a/src/features/raw.rs +++ b/src/features/raw.rs @@ -39,6 +39,36 @@ pub fn make_feature() -> Vec<(String, OptionValueFunction)> { _opt => "raw" ), ( + "minus-style", + String, + Some("color.diff.old"), + _opt => "red" + ), + ( + "minus-emph-style", + String, + Some("color.diff.old"), + _opt => "red" + ), + ( + "zero-style", + String, + None, + _opt => "normal" + ), + ( + "plus-style", + String, + Some("color.diff.new"), + _opt => "green" + ), + ( + "plus-emph-style", + String, + Some("color.diff.new"), + _opt => "green" + ), + ( "keep-plus-minus-markers", bool, None, |