Giter VIP home page Giter VIP logo

snapdiff's Issues

Define and implement behaviour for symlinks

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.)

Define and implement behaviour for hardlinks

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.

  • If you do cp -R for creating a snapshot, then all hardlinks from the original directory tree are created as individual files in the snapshot.
  • If you do 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.