-
-
Notifications
You must be signed in to change notification settings - Fork 740
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
Suppress modified changes for files which weren't actually modified in JSON output. #8334
Conversation
3b3e2bb
to
f7673e3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## 1.4-maint #8334 +/- ##
=============================================
+ Coverage 82.69% 82.73% +0.03%
=============================================
Files 38 38
Lines 11045 11049 +4
Branches 2122 2123 +1
=============================================
+ Hits 9134 9141 +7
+ Misses 1345 1344 -1
+ Partials 566 564 -2 ☔ View full report in Codecov by Sentry. |
4fe882c
to
e9841d9
Compare
e9841d9
to
938e144
Compare
@cr1901 OK, guess this is ready to merge? |
@ThomasWaldmann Okay to merge. |
@cr1901 Thanks! |
Guess a forward port to master branch would be good. 1.2-maint will be phased out in a while, so a backport to there is optional. |
Will do the port to master now. |
Right now, if
borg diff
is run with the--json-lines
parameter (and without--content-only
, files whose content have not been modified will still be given amodified
entry of{"added": 0, "removed": 0, "type": "modified"}
, e.g.:Per IRC discussion, this is considered a bug, as the file's content was not actually changed, and thus shouldn't be in the
changes
JSON array. This PR fixes the behavior so that JSON entries no longer get a"type": "modified"
object for files whose contents weren't changed, butctime
,mtime
, etc were changed. E.g.:Text output (without
--json-lines
) is unaffected; I feel that the0 B 0 B
is more useful for humans looking at output, compared to JSON processors :):