mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-31 05:33:01 +02:00
49: Rename incorrect --pattern-from option to correct --patterns-from.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1.1.14.dev0
|
||||
* #49: Rename incorrect --pattern-from option to correct --patterns-from.
|
||||
|
||||
1.1.13
|
||||
* #54: Fix for incorrect consistency check flags passed to Borg when all three checks ("repository",
|
||||
"archives", and "extract") are specified in borgmatic configuration.
|
||||
|
||||
@@ -57,7 +57,7 @@ def _make_pattern_flags(location_config, pattern_filename=None):
|
||||
|
||||
return tuple(
|
||||
itertools.chain.from_iterable(
|
||||
('--pattern-from', pattern_filename)
|
||||
('--patterns-from', pattern_filename)
|
||||
for pattern_filename in pattern_filenames
|
||||
)
|
||||
)
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_make_pattern_flags_includes_pattern_filename_when_given():
|
||||
pattern_filename='/tmp/patterns',
|
||||
)
|
||||
|
||||
assert pattern_flags == ('--pattern-from', '/tmp/patterns')
|
||||
assert pattern_flags == ('--patterns-from', '/tmp/patterns')
|
||||
|
||||
|
||||
def test_make_pattern_flags_includes_patterns_from_filenames_when_in_config():
|
||||
@@ -92,7 +92,7 @@ def test_make_pattern_flags_includes_patterns_from_filenames_when_in_config():
|
||||
location_config={'patterns_from': ['patterns', 'other']},
|
||||
)
|
||||
|
||||
assert pattern_flags == ('--pattern-from', 'patterns', '--pattern-from', 'other')
|
||||
assert pattern_flags == ('--patterns-from', 'patterns', '--patterns-from', 'other')
|
||||
|
||||
|
||||
def test_make_pattern_flags_includes_both_filenames_when_patterns_given_and_patterns_from_in_config():
|
||||
@@ -101,7 +101,7 @@ def test_make_pattern_flags_includes_both_filenames_when_patterns_given_and_patt
|
||||
pattern_filename='/tmp/patterns',
|
||||
)
|
||||
|
||||
assert pattern_flags == ('--pattern-from', 'patterns', '--pattern-from', '/tmp/patterns')
|
||||
assert pattern_flags == ('--patterns-from', 'patterns', '--patterns-from', '/tmp/patterns')
|
||||
|
||||
|
||||
def test_make_pattern_flags_considers_none_patterns_from_filenames_as_empty():
|
||||
|
||||
Reference in New Issue
Block a user