Skip to content

Commit

Permalink
Added --content-only flag for borg 1.2.4 in diff view
Browse files Browse the repository at this point in the history
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
  • Loading branch information
jetchirag authored and m3nu committed Mar 30, 2023
1 parent d024597 commit e0fe766
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/vorta/borg/_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'ZSTD': parse_version('1.1.4'),
'JSON_LOG': parse_version('1.1.0'),
'DIFF_JSON_LINES': parse_version('1.1.16'),
'DIFF_CONTENT_ONLY': parse_version('1.2.4'),
'COMPACT_SUBCOMMAND': parse_version('1.2.0a1'),
'V122': parse_version('1.2.2'),
'V2': parse_version('2.0.0b1'),
Expand Down
3 changes: 3 additions & 0 deletions src/vorta/borg/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def prepare(cls, profile, archive_name_1, archive_name_2):
ret['cmd'].append('--json-lines')
ret['json_lines'] = True

if borg_compat.check('DIFF_CONTENT_ONLY'):
ret['cmd'].append('--content-only')

if borg_compat.check('V2'):
ret['cmd'].extend(['-r', profile.repo.url, archive_name_1, archive_name_2])
else:
Expand Down

0 comments on commit e0fe766

Please sign in to comment.