1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-06 03:34:28 +00:00
restic/cmd/restic
greatroar a7786c67f1 cmd, restic: Refactor and fix snapshot filtering
This turns snapshotFilterOptions from cmd into a restic.SnapshotFilter
type and makes restic.FindFilteredSnapshot and FindFilteredSnapshots
methods on that type. This fixes #4211 by ensuring that hosts and paths
are named struct fields instead of unnamed function arguments in long
lists of such.

Timestamp limits are also included in the new type. To avoid too much
pointer handling, the convention is that time zero means no limit.
That's January 1st, year 1, 00:00 UTC, which is so unlikely a date that
we can sacrifice it for simpler code.
2023-02-19 15:04:25 +01:00
..
testdata
.gitignore
cleanup.go
cmd_backup.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_backup_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
cmd_cache.go
cmd_cat.go repository: Reuse buffers in Repository.LoadUnpacked 2023-01-30 22:01:01 +01:00
cmd_check.go check: Partially fix garbled output 2022-12-28 17:47:27 +01:00
cmd_check_test.go
cmd_copy.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_debug.go debug: fix crash in debug examine --reupload-blobs 2022-11-09 22:13:17 +01:00
cmd_diff.go
cmd_dump.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_dump_test.go
cmd_find.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_forget.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_generate.go
cmd_init.go init: use standard name message_type to distinguish JSON messages 2022-12-02 21:33:03 +01:00
cmd_key.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
cmd_list.go
cmd_ls.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_ls_test.go
cmd_migrate.go
cmd_mount.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_options.go
cmd_prune.go prune: Don't show "packs processed" for quiet runs 2023-01-14 18:48:32 +01:00
cmd_rebuild_index.go
cmd_recover.go
cmd_restore.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_rewrite.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_self_update.go Reinstate selfupdate tag to make builds without self-update work 2022-12-26 21:46:22 +04:00
cmd_snapshots.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_snapshots_test.go
cmd_stats.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_tag.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
cmd_unlock.go
cmd_version.go
delete.go
doc.go
exclude.go Cleanup exclude pattern collection 2022-11-12 19:55:22 +01:00
exclude_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
find.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
flags_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
format.go
global.go Make help for --verbose less confusing 2023-02-06 22:11:21 +01:00
global_debug.go
global_release.go
global_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
integration_filter_pattern_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
integration_fuse_test.go mount: only start next test after mount command cleanup is complete 2022-11-11 21:43:01 +01:00
integration_helpers_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
integration_helpers_unix_test.go Replace usages of ioutil.ReadDir 2022-12-02 19:54:27 +01:00
integration_helpers_windows_test.go Replace usages of ioutil.ReadDir 2022-12-02 19:54:27 +01:00
integration_rewrite_test.go rewrite: Add tests for further ways to use the command 2022-11-12 19:55:22 +01:00
integration_test.go cmd, restic: Refactor and fix snapshot filtering 2023-02-19 15:04:25 +01:00
local_layout_test.go
lock.go lock: add help message how to recover from invalid locks 2023-01-14 18:04:22 +01:00
lock_test.go Add more debug logging to TestLockSuccessfulRefresh 2022-12-03 12:05:38 +01:00
main.go Don't buffer the golang log output when running tests 2022-12-10 16:08:27 +01:00
progress.go progress: extract progress updating into Updater struct 2023-01-14 01:13:08 +01:00
secondary_repo.go
secondary_repo_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00