Make the action actually work. PR still pending a bunch of stuff.

This commit is contained in:
lingfish
2026-01-29 17:38:06 +11:00
parent de35ed82be
commit 794e7eadab
3 changed files with 7 additions and 6 deletions
+2 -5
View File
@@ -1,13 +1,12 @@
import logging
import borgmatic.actions.pattern
import borgmatic.borg.pattern
import borgmatic.borg.diff
import borgmatic.borg.pattern
logger = logging.getLogger(__name__)
def run_diff(
repository,
config,
@@ -23,9 +22,7 @@ def run_diff(
# Collect and process patterns.
processed_patterns = borgmatic.actions.pattern.process_patterns(
(
*borgmatic.actions.pattern.collect_patterns(config),
),
(*borgmatic.actions.pattern.collect_patterns(config),),
config,
borgmatic.config.paths.get_working_directory(config),
)
+1
View File
@@ -76,6 +76,7 @@ def diff(
else flags.make_repository_flags(repository, local_borg_version)
)
)
+ (diff_arguments.second_archive, )
)
borgmatic.execute.execute_command(
+4 -1
View File
@@ -1976,7 +1976,6 @@ def make_parsers(schema, unparsed_arguments): # noqa: PLR0915
aliases=ACTION_ALIASES['diff'],
help='This command finds differences (file contents, user/group/mode) between archives',
description='This command finds differences (file contents, user/group/mode) between archives',
add_help=False,
)
diff_group = diff_parser.add_argument_group('diff arguments')
diff_group.add_argument(
@@ -1987,6 +1986,10 @@ def make_parsers(schema, unparsed_arguments): # noqa: PLR0915
'--archive',
help='Archive name, hash, or series to diff, defaults to all archives in the repository (if specified)',
)
diff_group.add_argument(
'--second-archive',
help='Second archive name, hash, or series to diff',
)
borg_parser = action_parsers.add_parser(
'borg',