[DOC] #4118 - Explain difference between --exclude and --pattern. (#4783)

docs: Explain difference between --exclude and --pattern, fixes #4118
This commit is contained in:
Thalian 2019-10-19 21:38:24 +02:00 committed by TW
parent f07bcb1387
commit 212b438c3c
1 changed files with 7 additions and 0 deletions

View File

@ -2155,6 +2155,13 @@ class Archiver:
A root path starts with the prefix `R`, followed by a path (a plain path, not a A root path starts with the prefix `R`, followed by a path (a plain path, not a
file pattern). An include rule starts with the prefix +, an exclude rule starts file pattern). An include rule starts with the prefix +, an exclude rule starts
with the prefix -, an exclude-norecurse rule starts with !, all followed by a pattern. with the prefix -, an exclude-norecurse rule starts with !, all followed by a pattern.
.. note::
Via ``--pattern`` or ``--patterns-from`` you can define BOTH inclusion and exclusion
of files using pattern prefixes ``+`` and ``-``. With ``--exclude`` and
``--exlude-from`` ONLY excludes are defined.
Inclusion patterns are useful to include paths that are contained in an excluded Inclusion patterns are useful to include paths that are contained in an excluded
path. The first matching pattern is used so if an include pattern matches before path. The first matching pattern is used so if an include pattern matches before
an exclude pattern, the file is backed up. If an exclude-norecurse pattern matches an exclude pattern, the file is backed up. If an exclude-norecurse pattern matches