diff --git a/borgmatic/actions/diff.py b/borgmatic/actions/diff.py index c6d3bb8b..9d51982e 100644 --- a/borgmatic/actions/diff.py +++ b/borgmatic/actions/diff.py @@ -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), ) diff --git a/borgmatic/borg/diff.py b/borgmatic/borg/diff.py index 52b92104..bf89ab5b 100644 --- a/borgmatic/borg/diff.py +++ b/borgmatic/borg/diff.py @@ -76,6 +76,7 @@ def diff( else flags.make_repository_flags(repository, local_borg_version) ) ) + + (diff_arguments.second_archive, ) ) borgmatic.execute.execute_command( diff --git a/borgmatic/commands/arguments.py b/borgmatic/commands/arguments.py index 0b7df4e4..9150f91c 100644 --- a/borgmatic/commands/arguments.py +++ b/borgmatic/commands/arguments.py @@ -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',