From a94a15f3f19febc94af0d2f8dc3f1cacb4043c7d Mon Sep 17 00:00:00 2001 From: Jeff Turner Date: Wed, 26 Jul 2023 00:54:28 +1000 Subject: [PATCH] Doc clarifications --- docs/usage/help.rst.inc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/usage/help.rst.inc b/docs/usage/help.rst.inc index 0dca6744..df3053a5 100644 --- a/docs/usage/help.rst.inc +++ b/docs/usage/help.rst.inc @@ -17,16 +17,18 @@ unwanted ones. Patterns can be used - in the file given with ``--patterns-from`` option and - for ``PATH`` arguments that explicitly support them. -Borg always stores all file paths normalized and relative to the -first directory of the current recursion root. The recursion root is also named -``PATH`` in Borg commands like `borg create` that do a file discovery, so do -not confuse the root with the ``PATH`` argument of e.g. `borg extract`. +Borg always stores all file paths normalized, with the first part equal to the +recursion root, but (since 1.2) with any leading / or ../ removed. If you give +``/absolute/path`` as root, the paths going into the matcher will start with +``absolute/path``. If you wanted to exclude e.g. +``/absolute/path/logs/*.log``, the pattern ``logs/*.log`` would not match; you +must use ``absolute/path/logs/*.log`` or ``**/logs/*.log`` (using ``sh`` +patterns). The pattern ``/absolute/path/logs/*.log`` will also match, since +the leading path separator is stripped in patterns. -Starting with Borg 1.2, paths that are matched against patterns always -appear relative. If you give ``/absolute/path/`` as root, the paths going -into the matcher will start with ``absolute/``. -If you give ``../../relative`` as root, the paths will be normalized -as ``relative/``. +The recursion root is also named ``PATH`` in Borg commands like `borg create` +that do a file discovery, so do not confuse the root with the ``PATH`` +argument of e.g. `borg extract`. Borg supports different pattern styles. To define a non-default style for a specific pattern, prefix it with two characters followed