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

refactor: clean up file diff iterator logic #120

Merged
merged 23 commits into from
Apr 15, 2022
Merged

Conversation

Shadow53
Copy link
Owner

@Shadow53 Shadow53 commented Apr 15, 2022

Resolves #110 and #99.

This also removes the "Recreated" type, since it is too difficult to
tell the difference between it and "Created".
- Added checks in most recent logs for files that existed before but not
  now.
- Added `HoardFileDiff::Nonexistent` to indicate a file that is listed
  in the config but has never existed in Hoard.
- Added `ItemOperation::DoesNotExist` to correspond with the above.
- Because of these changes, a couple of "unreachable" branches became
  reachable, so that got fixed too.
Permissions checks were among the last few things to get test coverage,
but there is not a reliable way to maintain permissions across
filesystems and/or operating systems, particularly when Windows is
involved.

This removes permissions support. In the future, there will be a change
to apply permissions on restore.
@netlify
Copy link

netlify bot commented Apr 15, 2022

Deploy Preview for hoard-docs ready!

Name Link
🔨 Latest commit 2dfacd7
🔍 Latest deploy log https://app.netlify.com/sites/hoard-docs/deploys/62590c1ccdf5ec000812a042
😎 Deploy Preview https://deploy-preview-120--hoard-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Shadow53 Shadow53 linked an issue Apr 15, 2022 that may be closed by this pull request
@Shadow53 Shadow53 added this to the 0.5.0 milestone Apr 15, 2022
@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #120 (2dfacd7) into main (b707cf2) will increase coverage by 1.31%.
The diff coverage is 96.16%.

@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   90.49%   91.80%   +1.31%     
==========================================
  Files          69       73       +4     
  Lines        5037     5808     +771     
==========================================
+ Hits         4558     5332     +774     
+ Misses        479      476       -3     
Impacted Files Coverage Δ
src/checksum/mod.rs 100.00% <ø> (ø)
src/config/builder/environment/exe.rs 100.00% <ø> (ø)
src/filters/ignore.rs 100.00% <ø> (ø)
src/filters/mod.rs 100.00% <ø> (ø)
src/hoard/mod.rs 100.00% <ø> (+33.33%) ⬆️
src/lib.rs 100.00% <ø> (ø)
src/command/backup_restore.rs 76.66% <50.00%> (+0.80%) ⬆️
src/test.rs 66.66% <66.66%> (ø)
src/hoard/iter/operation.rs 91.17% <72.72%> (+8.31%) ⬆️
src/checkers/history/operation/mod.rs 79.42% <75.00%> (-2.43%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b707cf2...2dfacd7. Read the comment docs.

@Shadow53 Shadow53 merged commit f4ac1a2 into main Apr 15, 2022
@Shadow53 Shadow53 deleted the 110-refactor-diff-logic branch April 15, 2022 06:18
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

Successfully merging this pull request may close these issues.

Refactor file diff iterator logic cache file operations
1 participant