Skip to content
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

When range of lines is a single line, the format differs from upstream #10

Closed
oSoMoN opened this issue Feb 7, 2024 · 0 comments
Closed

Comments

@oSoMoN
Copy link
Collaborator

oSoMoN commented Feb 7, 2024

For the normal diff, when range of lines is a single line, the format differs from upstream.

(spotted when trying to run the upstream test suite, specifically that test)

Upstream compacts range "a,a" as just "a":

echo a > a
echo b > b
diff a b | head -1 # outputs "1c1"

Whereas this implementation doesn't compact it:

cargo run a b # incorrectly outputs "1,1c1,1"
oSoMoN added a commit to oSoMoN/uutils-diffutils that referenced this issue Feb 7, 2024
oSoMoN added a commit to oSoMoN/uutils-diffutils that referenced this issue Feb 7, 2024
sylvestre added a commit that referenced this issue Feb 9, 2024
Normal diff: compact ranges of lines where possible (fixes #10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant