Open
Conversation
This will take an md5sum of the rsync output of both the local and remote trees as they are output by rsync itself. This includes the mode, modify time, full file path, and size. If all attributes of all files match, then the md5 of the rsync listing stream will also match. With this patch, the sync will exit early if it determines that neither a pull nor a push is required.
If the inode of a directory changes (ownership or mode) and nothing else changes in the state of the system, then consider the changes to be insignificant. When a file is modified locally, then proceed to sync the local and remote systems.
For the optimization where the hash of the directory listing is considered and used to decide if it would be safe to skip using `rsync` to sync an identical listing, support macOS where `md5sum` is not the name of the utility.
6b87389 to
a3e5c9c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a different idea to the performance from. With this idea, the stream of the Rsync tree listing is MD5'd in sync with the rest of the
analyzeprocessing. If the two trees match according to the MD5 hash, then it is safe to assume that the trees match exactly and the sync can be aborted without further processing or inspection.