diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-11-29 10:37:35 -0500 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-12-05 11:25:05 -0500 |
commit | 422954164f68b95fe9578ab1e0e1d1c80ca9345e (patch) | |
tree | 2b766093a5d57d683192da7e0cb4125375beae37 /src/config.rs | |
parent | f73f0a8cbd8f66340817ab8b143f5a4459380647 (diff) |
Handle combined diff format
With this commit combined diff
format (https://git-scm.com/docs/git-diff#_combined_diff_format) is
handled appropriately. However, there is no special handling of merge
conflict markers.
Fixes #189, #736
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config.rs b/src/config.rs index af9ade09..5858afe5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -145,11 +145,11 @@ pub struct Config { impl Config { pub fn get_style(&self, state: &State) -> &Style { match state { - State::HunkMinus(_) => &self.minus_style, - State::HunkPlus(_) => &self.plus_style, + State::HunkMinus(_, _) => &self.minus_style, + State::HunkPlus(_, _) => &self.plus_style, State::CommitMeta => &self.commit_style, - State::DiffHeader => &self.file_style, - State::HunkHeader(_, _) => &self.hunk_header_style, + State::DiffHeader(_) => &self.file_style, + State::HunkHeader(_, _, _) => &self.hunk_header_style, State::SubmoduleLog => &self.file_style, _ => delta_unreachable("Unreachable code reached in get_style."), } |