jotaen / snapdiff Goto Github PK
View Code? Open in Web Editor NEWCLI tool for comparing the difference between two directory snapshots
License: MIT License
CLI tool for comparing the difference between two directory snapshots
License: MIT License
For my own purposes, I rely on snapdiff’s default behaviour, which is to skip symlinks. Therefore, I’m actually not sure how well things go in case they are enabled. (Think: circular references.)
It probably doesn’t make sense to resolve symlinks, and count the bytes of the target file. (Also note, the symlink could point to a file outside of the snapshot directory, in which case we certainly don’t want to count these bytes.) But it still might be of interest to see whether a symlink has changed it’s target, or whether it still points to the same file.
I’m wondering whether it’s reasonable enough to include symlinks in the regular file count, without incrementing the byte count, though. So, e.g., a symlink target was changed, increment the “modified” file counter, but not the “modified” byte size.
Otherwise, it might be necessary to introduce a completely separate category or counting logic for symlinks.
(Originally from #2.)
I also haven’t considered hardlinks so far, so their behaviour is not well-defined.
Hardlinks are quite tricky, because their behaviour depends on how the snapshots were created, or whether you compare two snapshots against each other, or whether you compare one snapshot against the original directory tree.
cp -R
for creating a snapshot, then all hardlinks from the original directory tree are created as individual files in the snapshot.rsync -r --hard-links
for creating a snapshot, then all hardlinks from the original directory tree are cloned (as hardlinks) in the snapshot.The other issue is that it’s more complex to determine the “redundant” hardlinks within the same snapshot in the first place.
Not sure yet, what the best solution is here. I’m also not sure how common this problem actually is, or whether the additional complexity of solving it is worth the benefit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.