forked from restic/restic
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from restic:master #108
Merged
Merged
Conversation
This file contains 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
That way consumers no longer have to manually convert the returned name to an id.
On my machine this decreases the runtime for `./cmd/restic` from 9.5s to 6.5s.
The comparison of the current time and the last lock refresh were using seconds represented as integers. As the test only waits for up to one second, the associated number truncation can cause the test to take longer than once second and thus to fail. Switch to nanoseconds to avoid this problem. This also slightly speeds up the test.
The test is identical to the tests for the mem backend.
ID.UnmarshalJSON accepted non-JSON input with ' as the string delimiter. Also, the error message for non-hex input was less informative than it could be and it performed too many checks. Changed ParseID to keep the error messages consistent.
if x { return true } return false => return x fmt.Sprintf("%v", x) => fmt.Sprint(x) or x.String() The fmt.Sprintf idiom is still used in the SecretString tests, where it serves security hardening.
The string form was presumably useful before the introduction of layouts, but right now it just makes call sequences and garbage collection more expensive (the latter because every string contains a pointer to be scanned).
Calculate and display compression ratio, space saving and progress
There is no need to use a special wildcard `**` to demonstrate negative patterns. Actually, it is both slower than the simpler variant and seems to confuse users.
Archiver.Save queries the current time multiple times. This commit removes one of these calls as they showed up while profiling a backup of a nearly unchanged dataset containing 3 million files.
More cleanups and a micro-optimization
lock: fix flaky TestLockFailedRefresh
Port restic.Find to return IDs and identify keys by restic.ID
speed-up integration tests by reducing the RetryBackend timeout
backup: reduce calls to time.Now
The RetryBackend tests depend on the mock backend. When the Backend interface is eventually split from the restic package, this will lead to a dependency cycle between backend and backend/mock. Thus split the RetryBackend into a separate package to avoid this problem.
This is a preparation to make the exclude options usable for the upcoming `rewrite` command.
Split backend package into smaller parts
…-options backup: extract exclude pattern options
Unify ForAllIndex/Snapshot/Lock functions
…mple Remove misleading wildcard from negative exclude pattern example
restic stats: print uncompressed size in mode raw-data
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.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )