Minor comment clarifications (#962).

This commit is contained in:
Dan Helfman 2025-01-10 22:20:49 -08:00
commit 256ed4170b
2 changed files with 6 additions and 5 deletions

View file

@ -175,11 +175,11 @@ def deduplicate_patterns(patterns):
'''
Given a sequence of borgmatic.borg.pattern.Pattern instances, return them with all duplicate
root child patterns removed. For instance, if two root patterns are given with paths "/foo" and
"/foo/bar", return just the one with "/foo". Non-root patterns are passed through with
"/foo/bar", return just the one with "/foo". Non-root patterns are passed through without
modification.
The one exception to this rule is if two paths are on different filesystems (devices). In that
case, they won't get de-duplicated, in case they both need to be passed to Borg (e.g. the
The one exception to deduplication is two paths are on different filesystems (devices). In that
case, they won't get deduplicated, in case they both need to be passed to Borg (e.g. the
one_file_system option is true).
The idea is that if Borg is given a root parent pattern, then it doesn't also need to be given

View file

@ -22,8 +22,9 @@ logger = logging.getLogger(__name__)
def write_patterns_file(patterns, borgmatic_runtime_directory, log_prefix, patterns_file=None):
'''
Given a sequence of patterns as borgmatic.borg.pattern.Pattern instances, write them to a
named temporary file in the given borgmatic runtime directory and return the file object.
Given a sequence of patterns as borgmatic.borg.pattern.Pattern instances, write them to a named
temporary file in the given borgmatic runtime directory and return the file object so it can
continue to exist on disk as long as the caller needs it.
Use the given log prefix in any logging.