- Notifications
You must be signed in to change notification settings - Fork0
Utility to produce a difference between two directories suitable for union filesystems
License
msg555/uniondiff
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
uniondiff is a simple tool for calculating the directory difference between twodirectories or archives.uniondiff performs the calculation below:
upper = merged - lowerThis tool acts as the inverseunion mountfile systems. Whereas typically you combine alower andupper directory toproduce amerged directory,uniondiff takes as input themerged directoryand subtracts out thelower directory to produce theupper directory. Inparticular, the resulting output can be mounted as theupper directoryalong with thelower to produce the originalmerged directory.
uniondiff is intended for use with low level file system tools (e.g. containersystems) or for simply storing diffs of directories. Note that this tooldoesnot store compact diffs of individual files; a file will appear in full in thediff iff its content or metadata has changed between themerged andloweroperands.
uniondiff can be installed throughpip. This installs both theuniondiffCLI utility and theuniondiff Python library.
pip install uniondiff
uniondiff is supported and tested on Python 3.8-3.12
Compute the directory difference between the directory "data-day10" and"data-day9". By default the output will be written as a tar file.
uniondiff data-day10 data-day9> diff.taruniondiff can also write directly to the file system. Note that it will ignoreownership changes unless you also pass the--preserve-owners flag.
uniondiff data-day10 data-day9 --output-type file -o diff
You can also use tar archives as the input paths.
uniondiff data-day10.tar data-day9.tgz> diff.tarIf you want to contribute touniondiff, you can do so by creating a pull request.lease make sure to include a detailed description of the changes you're proposing.
About
Utility to produce a difference between two directories suitable for union filesystems
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.