diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-05-30 15:43:34 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-05-30 16:55:38 -0400 |
commit | 0fac9007c5bc807b1a6012a0fb48e7ce8701478d (patch) | |
tree | 5a4b57cccd0451a2e201bc5e5d5eb8142992c252 /src/delta.rs | |
parent | ccdec160407d25cbe3eb461b06c5b4c7cbd3842d (diff) |
Implement --thing-style omit
Diffstat (limited to 'src/delta.rs')
-rw-r--r-- | src/delta.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/delta.rs b/src/delta.rs index bebf2e16..02a1cc6d 100644 --- a/src/delta.rs +++ b/src/delta.rs @@ -193,6 +193,9 @@ fn handle_commit_meta_header_line( line: &str, config: &Config, ) -> std::io::Result<()> { + if config.commit_style.is_omitted { + return Ok(()); + } let decoration_ansi_term_style; let mut pad = false; let draw_fn = match config.commit_style.decoration_style { @@ -246,6 +249,9 @@ fn handle_generic_file_meta_header_line( line: &str, config: &Config, ) -> std::io::Result<()> { + if config.file_style.is_omitted { + return Ok(()); + } let decoration_ansi_term_style; let mut pad = false; let draw_fn = match config.file_style.decoration_style { @@ -291,6 +297,9 @@ fn handle_hunk_header_line( raw_line: &str, config: &Config, ) -> std::io::Result<()> { + if config.hunk_header_style.is_omitted { + return Ok(()); + } let decoration_ansi_term_style; let draw_fn = match config.hunk_header_style.decoration_style { DecorationStyle::Box(style) => { |