restic/doc
Winfried Plappert 5148608c39 restic rewrite include - based on restic 0.18.1
cmd/restic/cmd_rewrite.go:
introduction of include filters for this command:
- add include filters, add error checking code
- add new parameter 'keepEmptyDirectoryFunc' to 'walker.NewSnapshotSizeRewriter()',
  so empty directories have to be kept to keep the directory structure intact
- add parameter 'keepEmptySnapshot' to 'filterAndReplaceSnapshot()' to keep snapshots
  intact when nothing is to be included
- introduce helper function 'gatherIncludeFilters()' and 'gatherExcludeFilters()' to
  keep code flow clean

cmd/restic/cmd_rewrite_integration_test.go:
add several new tests around the 'include' functionality

internal/filter/include.go:
this is where is include filter is defined

internal/walker/rewriter.go:
- struct RewriteOpts gains field 'KeepEmtpyDirectory', which is a 'NodeKeepEmptyDirectoryFunc()'
  which defaults to nil, so that al subdirectories are kept
- function 'NewSnapshotSizeRewriter()' gains the parameter 'keepEmptyDirecoryFilter' which
  controls the management of empty subdirectories in case of include filters active

internal/data/tree.go:
gains a function Count() for checking the number if node elements in a newly built tree

internal/walker/rewriter_test.go:
function 'NewSnapshotSizeRewriter()' gets an additional parameter nil to keeps things happy

cmd/restic/cmd_repair_snapshots.go:
function 'filterAndReplaceSnapshot()' gets an additional parameter 'keepEmptySnapshot=nil'

doc/045_working_with_repos.rst:
gets to mention include filters

changelog/unreleased/issue-4278:
the usual announcement file

git rebase master -i produced this

restic rewrite include - keep linter happy

cmd/restic/cmd_rewrite_integration_test.go:
linter likes strings.Contain() better than my strings.Index() >= 0
2026-01-31 19:42:56 +00:00
..
_static docs: fix table width 2025-12-03 20:38:21 +01:00
images/aws_s3 Update AWS S3 tutorial, fixing #1593 2018-01-29 20:47:27 +01:00
logo Update logo 2018-02-05 20:48:48 +01:00
man Update manpages and auto-completion 2025-03-27 20:16:56 +01:00
.gitignore Document the build and release processes 2018-10-13 13:48:03 +02:00
010_introduction.rst doc: move quickstart to docs 2023-07-23 17:32:37 +02:00
020_installation.rst bump minimum go version to 1.24 2025-11-26 21:33:40 +01:00
030_preparing_a_new_repo.rst Fully rework docs for group-accessible repositories 2025-10-03 21:24:57 +02:00
040_backup.rst docs: move environment variables to the scripting section 2025-12-03 18:38:36 +01:00
045_working_with_repos.rst restic rewrite include - based on restic 0.18.1 2026-01-31 19:42:56 +00:00
047_tuning_parameters.rst docs: clarify that parameter tuning applies to all commands 2025-12-03 18:33:00 +01:00
050_restore.rst doc: fix various typos 2025-03-05 20:47:08 -05:00
060_forget.rst Improve example for forget --keep-daily 2025-10-22 11:31:50 +02:00
070_encryption.rst docs: explain meaning of asterisk when managing repository keys 2023-08-27 10:40:55 +02:00
075_scripting.rst slightly reduce redundant wording 2026-01-31 19:07:06 +01:00
077_troubleshooting.rst restic check with snapshot filters (#5469) 2025-11-28 19:12:38 +00:00
080_examples.rst Merge pull request #5386 from Hello71/patch-2 2025-11-16 11:54:43 +01:00
090_participating.rst docs: sync compatibility section with website 2025-09-06 20:55:48 +02:00
100_references.rst doc: Split references out into smaller files 2018-06-18 22:17:48 +02:00
110_talks.rst doc: Correct broken links 2023-03-22 17:37:58 +01:00
bash-completion.sh Update manpages and auto-completion 2025-03-27 20:16:56 +01:00
cache.rst Wording: change repo to repository 2022-07-08 20:05:35 +02:00
conf.py doc: add edit on github link 2025-01-31 18:53:03 +01:00
design.rst add changelog and update threat model 2025-03-24 17:03:43 +01:00
developer_information.rst docs: fix typos in developer information (#5329) 2025-04-02 21:12:43 +02:00
faq.rst updated doc/faq.rst_commitsSquashed 2025-05-11 14:02:07 -04:00
fish-completion.fish Fix typos 2023-12-06 13:11:55 +01:00
index.rst docs: clarify that parameter tuning applies to all commands 2025-12-03 18:33:00 +01:00
Makefile Document the build and release processes 2018-10-13 13:48:03 +02:00
manual_rest.rst only suggest TMP as tmp dir variable on windows 2025-11-16 17:31:36 +01:00
powershell-completion.ps1 Update manpages and auto-completion 2025-03-27 20:16:56 +01:00
requirements.txt Documentation: Refactor and switch to Sphinx 2017-04-17 20:53:38 +02:00
REST_backend.rst doc: remove blockquotes from unordered lists 2024-01-23 19:03:54 +01:00
test_irreducibility.gap chunker: Require a random irreducible polynomial 2015-04-05 22:52:43 +02:00
zsh-completion.zsh Update manpages and auto-completion 2023-07-31 20:23:24 +02:00