restic/changelog/unreleased
Vincent Bernat 2ee07ded2b filter: ability to use negative patterns
This is quite similar to gitignore. If a pattern is suffixed by an
exclamation mark and match a file that was previously matched by a
regular pattern, the match is cancelled. Notably, this can be used
with `--exclude-file` to cancel the exclusion of some files.

Like for gitignore, once a directory is excluded, it is not possible
to include files inside the directory. For example, a user wanting to
only keep `*.c` in some directory should not use:

    ~/work
    !~/work/*.c

But:

    ~/work/*
    !~/work/*.c

I didn't write documentation or changelog entry. I would like to get
feedback if this is the right approach for excluding/including files
at will for backups. I use something like this as an exclude file to
backup my home:

    $HOME/**/*
    !$HOME/Documents
    !$HOME/code
    !$HOME/.emacs.d
    !$HOME/games
    # [...]
    node_modules
    *~
    *.o
    *.lo
    *.pyc
    # [...]
    $HOME/code/linux/*
    !$HOME/code/linux/.git
    # [...]

There are some limitations for this change:

 - Patterns are not mixed accross methods: patterns from file are
   handled first and if a file is excluded with this method, it's not
   possible to reinclude it with `--exclude !something`.

 - Patterns starting with `!` are now interpreted as a negative
   pattern. I don't think anyone was relying on that.

 - The whole list of patterns is walked for each match. We may
   optimize later by exiting early if we know no pattern is starting
   with `!`.

Fix #233
2022-03-20 13:33:08 +01:00
..
.gitignore Add gitignore to changelog/unreleased 2020-11-05 09:01:32 +01:00
issue-233 filter: ability to use negative patterns 2022-03-20 13:33:08 +01:00
issue-1542 Add use case to changelog 2021-08-04 21:19:29 +02:00
issue-2202 Add changelog for #3246 2021-09-07 21:18:11 +02:00
issue-2345 Save cached files to a temporary location first 2021-08-04 22:02:42 +02:00
issue-2388 s3: Add warning if key ID or secret is empty 2021-10-06 23:13:40 +01:00
issue-2508 diff: fix test failure and add remark on quiet to changelog 2022-02-05 23:02:07 +01:00
issue-2656 Add --insecure-tls flag to disable SSL cert verification 2021-09-21 10:52:40 -04:00
issue-2738 Add changelog 2021-09-12 16:00:49 +02:00
issue-3127 [#issue 3127] Add xattr support for Solaris 2022-02-13 14:24:37 +05:30
issue-3382 add changelog issue-3382 2021-11-04 15:13:48 +01:00
issue-3464 [issue 3464] skip lock creation in case of dry-run 2022-01-23 06:44:41 +03:00
issue-3490 [#issue 3490] Support for specifying file size in read-data-subset 2021-11-02 15:25:46 +05:30
issue-3518 tweak copy --no-lock changelog 2021-12-27 18:22:25 +01:00
issue-3541 b2: Successful delete if file does not exist 2021-10-09 23:51:12 +02:00
issue-3542 Add file mode in symbolic notation to ls --json 2021-11-16 19:45:50 +02:00
issue-3556 Add PR link to changelog 2021-11-13 22:25:54 +01:00
issue-3601 fix: rclone receiving SIGINT prematurely on Windows causing restic hang forever 2021-12-28 13:14:46 +08:00
issue-3641 Don't set a parent for --stdin backups 2022-02-19 10:41:33 +01:00
pull-2594 Reword changelog 2021-09-19 14:41:07 +02:00
pull-2816 Add changelog for O_NOATIME 2022-02-06 15:00:37 +01:00
pull-2880 Improve recover 2021-09-03 21:36:57 +02:00
pull-3429 Add changelog for #3429 2021-08-16 17:42:16 +02:00
pull-3436 Add changelog 2021-08-04 21:51:53 +02:00
pull-3488 Add changelog 2021-08-22 18:29:58 +02:00
pull-3508 Add changelog entry for PR #3508 2021-09-24 15:45:09 +02:00
pull-3514 rclone: add timeout option and documentation 2021-11-07 17:49:21 +01:00
pull-3519 Require Go 1.14 to build 2021-09-19 16:18:19 +02:00
pull-3591 prune: Handle --max-repack-size=0 as expected 2021-12-27 15:48:56 +01:00
pull-3593 Parallelize blob upload/download for restic copy 2021-12-29 18:59:09 +01:00
pull-3619 Avoid choosing parent snapshot newer than time of current snapshot 2022-01-23 23:55:00 -05:00