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

New command merge #411

Merged
merged 6 commits into from
Mar 9, 2023
Merged

New command merge #411

merged 6 commits into from
Mar 9, 2023

Conversation

aawsome
Copy link
Member

@aawsome aawsome commented Jan 30, 2023

This PR adds the merge command which allows to merge multiple snapshots.
It also fixes a minor bug how multiple paths were saved using #458.

The merging strategy is as follows:

  • If files only exist in one of the snapshots, add this file to the newly created one
  • If files with identical names but different content exist, take the file with newest mtime.

closes #43

TODO:

  • compute correct "paths" of merged snapshots
  • compute correct summary of merged snapshot, e.g. #files #dirs, total size, etc..
  • enable setting other snapshot info, like tags, label, ... (use default if all are identical?)
  • add --json flag
  • add --delete flag to remove original snapshots

@aawsome aawsome force-pushed the merge-snapshots branch 2 times, most recently from 29c66d0 to 19a8801 Compare March 9, 2023 08:24
@aawsome aawsome changed the title WIP: Merge snapshots New command merge Mar 9, 2023
@aawsome aawsome merged commit 81650ff into main Mar 9, 2023
@aawsome aawsome deleted the merge-snapshots branch March 9, 2023 08:43
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.

Allow to merge snapshots
1 participant