diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-07-01 10:57:11 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-07-01 10:57:11 -0400 |
commit | 5db4565d2cddf103e4aecaa433cbca1fa51ba7bb (patch) | |
tree | 4f5f8c46e29ef571b69677622530662da232d7dd /src/delta.rs | |
parent | 839a36412ae51fafbed2a86690b8e4cf6c28b443 (diff) |
Improve unified diff directory diff handling
Fixes #232
Diffstat (limited to 'src/delta.rs')
-rw-r--r-- | src/delta.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/delta.rs b/src/delta.rs index e00f4491..1bb1db5e 100644 --- a/src/delta.rs +++ b/src/delta.rs @@ -178,9 +178,12 @@ fn should_handle(state: &State, config: &Config) -> bool { fn detect_source(line: &str) -> Source { if line.starts_with("commit ") || line.starts_with("diff --git ") { Source::GitDiff - } else if line.starts_with("diff -u ") + } else if line.starts_with("diff -u") + || line.starts_with("diff -ru") + || line.starts_with("diff -r -u") || line.starts_with("diff -U") || line.starts_with("--- ") + || line.starts_with("Only in ") { Source::DiffUnified } else { |