Added last-modified comparison and --exclude glob syntax#31
Open
schweickism wants to merge 5 commits intoseedifferently:masterfrom
Open
Added last-modified comparison and --exclude glob syntax#31schweickism wants to merge 5 commits intoseedifferently:masterfrom
schweickism wants to merge 5 commits intoseedifferently:masterfrom
Conversation
…sync. Traditional rsync looks for equality in last-modified. Since we only have time uploaded to work with, this implementation opts to preserve the more recent copy, similar to rsync --update. I think this is relatively intuitive for uploads, but it could be problematic for downloads if the user is trying to "restore" as opposed to "get up to date" - I'm figuring in the case of the former it's easier to delete the local copy and try again than to recover inadvertently overwriting a file. This also implements a --size-only option like rsync's which can overcome the potential pitfall above.
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.
Attempt at implementing last-modified check. It's slightly different than rsync's default "quick check" because (in my testing at least) this turned out to be the time uploaded rather than preserving the actual file meta data as you'd get rsyncing to a more traditional file system.
--excludebased on PR from Dave Lane. I believe the updated style is more like actual rsync behavior.I'm aware this script maybe isn't being maintained right now, but thought these updates might be useful to someone anyway.