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
Add bitrot detection to "diff" command #4526
Conversation
Sadly, I couldn't figure out a good way to test this... I did however verify it manually. I also feel like some more verbose documentation could be useful (along the lines of the commit message), but I wasn't sure where to put it. Any suggestions? The section in |
e598d2a
to
142e4e4
Compare
The explanation of the
What might work is the following: backup now supports the The other alternative would be to enhance the code at |
142e4e4
to
4d15c8f
Compare
This introduces a new modifier to the output of the diff command. It appears whenever two files being compared only differ in their content but not in their metadata. As far as we know, under normal circumstances, this should only ever happen if some kind of bitrot has happened in the source file. The prerequisite for this detection to work is that the right-side snapshot of the comparison has been created with "backup --force".
4d15c8f
to
4f6b1bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What does this PR change? What problem does it solve?
This introduces a new modifier to the output of the diff command. It appears whenever two files being compared only differ in their content but not in their metadata. As far as we know, under normal circumstances, this should only ever happen if some kind of bitrot has happened in the source file. The prerequisite for this detection to work is that the right-side snapshot of the comparison has been created with "backup --force".
Was the change previously discussed in an issue or on the forum?
See #805
Checklist
changelog/unreleased/
that describes the changes for our users (see template).gofmt
on the code in all commits.