From 256ed4170b692b4632ba967a6c7adae699c1ca23 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 10 Jan 2025 22:20:49 -0800 Subject: [PATCH] Minor comment clarifications (#962). --- borgmatic/actions/create.py | 6 +++--- borgmatic/borg/create.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/borgmatic/actions/create.py b/borgmatic/actions/create.py index 8075b34d..30f8dca5 100644 --- a/borgmatic/actions/create.py +++ b/borgmatic/actions/create.py @@ -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 diff --git a/borgmatic/borg/create.py b/borgmatic/borg/create.py index 29d23f16..2aef84b2 100644 --- a/borgmatic/borg/create.py +++ b/borgmatic/borg/create.py @@ -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.