mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-08-02 22:53:01 +02:00
Make the action actually work. PR still pending a bunch of stuff.
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
||||
@@ -76,6 +76,7 @@ def diff(
|
||||
else flags.make_repository_flags(repository, local_borg_version)
|
||||
)
|
||||
)
|
||||
+ (diff_arguments.second_archive, )
|
||||
)
|
||||
|
||||
borgmatic.execute.execute_command(
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user