-
Notifications
You must be signed in to change notification settings - Fork 10
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
Handle directory-file and file-directory comparisons in the diff #56
Conversation
Well, this will handle $ diff -u - a < d
--- -/a 2024-04-20 22:16:11.145369745 +0530
+++ a 2024-04-20 22:15:57.785813179 +0530
@@ -1 +1 @@
-da
+a
$ cargo run -- -u - a < d
Finished dev [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/diffutils -u - a`
Failed to read from-file: Is a directory (os error 21) GNU diff (3.9+) implementes |
8b2f67b
to
7dacdb3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 81.78% 81.82% +0.03%
==========================================
Files 10 10
Lines 2877 2927 +50
Branches 740 747 +7
==========================================
+ Hits 2353 2395 +42
- Misses 503 509 +6
- Partials 21 23 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
sorry but your test fails on windows with:
|
GNU diff treats `diff DIRECTORY FILE` as `diff DIRECTORY/FILE FILE`
46245f3
to
65993d6
Compare
That would be nice to have, but it can be implemented in a followup PR. |
GNU diff treats
diff DIRECTORY FILE
asdiff DIRECTORY/FILE FILE