Bladeren bron

fix "--recompress option is counter intuitive", fixes #5154 (#5155)

docs: clarify --recompress option, fixes #5154
RR 5 jaren geleden
bovenliggende
commit
0e76dff33e
1 gewijzigde bestanden met toevoegingen van 10 en 9 verwijderingen
  1. 10 9
      src/borg/archiver.py

+ 10 - 9
src/borg/archiver.py

@@ -4104,15 +4104,16 @@ class Archiver:
                                         '"borg help compression" command for details.')
         archive_group.add_argument('--recompress', metavar='MODE', dest='recompress', nargs='?',
                                    default='never', const='if-different', choices=('never', 'if-different', 'always'),
-                                   help='recompress data chunks according to ``--compression``. '
-                                        'MODE `if-different`: '
-                                        'recompress if current compression is with a different compression algorithm '
-                                        '(the level is not considered). '
-                                        'MODE `always`: '
-                                        'recompress even if current compression is with the same compression algorithm '
-                                        '(use this to change the compression level). '
-                                        'MODE `never` (default): '
-                                        'do not recompress.')
+                                   help='recompress data chunks according to `MODE` and ``--compression``. '
+                                        'Possible modes are '
+                                        '`if-different`: recompress if current compression is with a different '
+                                        'compression algorithm (the level is not considered); '
+                                        '`always`: recompress even if current compression is with the same '
+                                        'compression algorithm (use this to change the compression level); and '
+                                        '`never`: do not recompress (use this option to explicitly prevent '
+                                        'recompression). '
+                                        'If no MODE is given, `if-different` will be used. '
+                                        'Not passing --recompress is equivalent to "--recompress never".')
         archive_group.add_argument('--chunker-params', metavar='PARAMS', dest='chunker_params',
                                    type=ChunkerParams, default=CHUNKER_PARAMS,
                                    help='specify the chunker parameters (ALGO, CHUNK_MIN_EXP, CHUNK_MAX_EXP, '