Преглед на файлове

repo-list --short: only print archive IDs

Needed to change this because listing just the
archive names is pretty useless if names are not
unique.

The short list is likely mostly used by scripts to
iterate over all archives, so outputting IDs is
better.
Thomas Waldmann преди 8 месеца
родител
ревизия
1b680531ee
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/borg/archiver/repo_list_cmd.py

+ 2 - 2
src/borg/archiver/repo_list_cmd.py

@@ -20,7 +20,7 @@ class RepoListMixIn:
         if args.format is not None:
             format = args.format
         elif args.short:
-            format = "{archive}{NL}"
+            format = "{id}{NL}"
         else:
             format = os.environ.get("BORG_RLIST_FORMAT", "{archive:<36} {time} [{id}]{NL}")
         formatter = ArchiveFormatter(format, repository, manifest, manifest.key, iec=args.iec)
@@ -93,7 +93,7 @@ class RepoListMixIn:
         )
         subparser.set_defaults(func=self.do_repo_list)
         subparser.add_argument(
-            "--short", dest="short", action="store_true", help="only print the archive names, nothing else"
+            "--short", dest="short", action="store_true", help="only print the archive IDs, nothing else"
         )
         subparser.add_argument(
             "--format",