Clarify wording when a parsed file has no changes at all

pull/185/head
Wilfred Hughes 2022-03-26 23:31:12 +07:00
parent 92b9680ecd
commit 1d7324c2dc
6 changed files with 19 additions and 2 deletions

@ -6,6 +6,10 @@ Difftastic no longer shows "1/1" when a file only has a single hunk.
Improved Scala syntax highlighting.
When a file is entirely unchanged, difftastic now shows "no changes"
even if it successfully parsed. Previously it would only show "no
syntactic changes".
## 0.24 (release 26th March 2022)
### Diffing

@ -40,6 +40,9 @@ sample_files/helpful_before.el sample_files/helpful_after.el
sample_files/helpful-unit-test-before.el sample_files/helpful-unit-test-after.el
e98b3bad1d2db81284f11d3936078ece -
sample_files/identical_before.scala sample_files/identical_after.scala
ff7c743ea9a423405682871e80149462 -
sample_files/if_before.py sample_files/if_after.py
e633761742973b2ef3b2ed078cedbdf2 -

@ -0,0 +1,5 @@
object Hello {
def main(args: Array[String]) = {
println("Hello, world")
}
}

@ -0,0 +1,5 @@
object Hello {
def main(args: Array[String]) = {
println("Hello, world")
}
}

@ -395,7 +395,7 @@ fn print_diff_result(
"{}",
style::header(&summary.path, 1, 1, &lang_name, use_color, background)
);
if lang_name == "Text" {
if lang_name == "Text" || summary.lhs_src == summary.rhs_src {
// TODO: there are other Text names now, so
// they will hit the second case incorrectly.
println!("No changes.\n");

@ -1,6 +1,6 @@
use crate::syntax::MatchedPos;
#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
pub enum FileContent {
Text(String),
Binary(Vec<u8>),