-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline diff is ignoring unchanged lines between hunks #704
Comments
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 13, 2024
I'm going to fix inline diff issue Wilfred#704, and found that the inline format isn't covered by CLI tests. I could duplicate compare_all.sh to test various formats, but it's uneasy to review that a new formatting is better than the previous version. I think snapshot testing will help guarantee the output quality without increasing maintenance burden too much. If we like the idea, maybe we can migrate some of compare_all.sh tests to the insta-based ones. Note that this will add ~10sec to "cargo test" runs.
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 13, 2024
Before, unchanged lines were omitted from the inline display. Though line numbers are correct, it provided wrong indication that these lines were removed. With this change, all contiguous left/right-side lines are printed, and only common context lines are omitted from the middle. Left/right lines within a hunk aren't interleaved as before, which I think is nice property of difft. Closes Wilfred#704
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 13, 2024
I'm going to fix inline diff issue Wilfred#704, and found that the inline format isn't covered by CLI tests. I could duplicate compare_all.sh to test various formats, but it's uneasy to review that a new formatting is better than the previous version. I think snapshot testing will help guarantee the output quality without increasing maintenance burden too much. If we like the idea, maybe we can migrate some of compare_all.sh tests to the insta-based ones. Note that this will add ~10sec to "cargo test" runs.
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 13, 2024
I'm going to fix inline diff issue Wilfred#704, and found that the inline format isn't covered by CLI tests. I could duplicate compare_all.sh to test various formats, but it's uneasy to review that a new formatting is better than the previous version. I think snapshot testing will help guarantee the output quality without increasing maintenance burden too much. If we like the idea, maybe we can migrate some of compare_all.sh tests to the insta-based ones. Note that this will add ~10sec to "cargo test" runs.
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 13, 2024
Before, unchanged lines were omitted from the inline display. Though line numbers are correct, it provided wrong indication that these lines were removed. With this change, all contiguous left/right-side lines are printed, and only common context lines are omitted from the middle. Left/right lines within a hunk aren't interleaved as before, which I think is nice property of difft. Closes Wilfred#704
yuja
added a commit
to yuja/difftastic
that referenced
this issue
Jun 15, 2024
Before, unchanged lines were omitted from the inline display. Though line numbers are correct, it provided wrong indication that these lines were removed. With this change, all contiguous left/right-side lines are printed, and only common context lines are omitted from the middle. Left/right lines within a hunk aren't interleaved as before, which I think is nice property of difft. Closes Wilfred#704
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A description of the issue. A screenshot is often helpful too.
Inline diff (side-by-side works well) skips unchanged lines producing confusing diffs:
$ difft --display inline --context 5 before.txt after.txt
side-by-side is showing the
try
andfinally
lines ok:$ difft --context 5 before.txt after.txt
A copy of what you're diffing. If you're diffing files, include the before and after files. If you're using difftastic with a VCS repository (e.g. git), include the URL and commit hash.
Using before.txt and after.txt.
Note those are groovy files (that difftastic handles as text). But even renamed to
.java
, the inline diff have same problem.The version of difftastic you're using (see
difft --version
) and your operating system.Difftastic 0.58.0 (f52ca70 2024-04-09, built with rustc 1.65.0)
Linux arch 6.8.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: