Clarified command line flags for dvc gc (#1644)

* Clarified command line flags for dvc gc

* Formatted with black, more explanation in GC_HELP

* Fix typo in GC_HELP

* Style corrections
This commit is contained in:
Guy Smoilov
2019-02-23 09:39:03 +02:00
committed by Ruslan Kuprieiev
parent 63f87ba9fe
commit 220b4b26a2
+11 -5
View File
@@ -46,7 +46,11 @@ class CmdGC(CmdBase):
def add_parser(subparsers, parent_parser):
GC_HELP = "Collect garbage."
GC_HELP = (
"Collect garbage from your DVC cache. \n"
"Deletes all files in the cache which are not in use by the "
"specified git references (defaults to just HEAD)."
)
gc_parser = subparsers.add_parser(
"gc", parents=[parent_parser], description=GC_HELP, help=GC_HELP
)
@@ -55,14 +59,14 @@ def add_parser(subparsers, parent_parser):
"--all-branches",
action="store_true",
default=False,
help="Collect garbage for all branches.",
help="Keep data files for the tips of all git branches.",
)
gc_parser.add_argument(
"-T",
"--all-tags",
action="store_true",
default=False,
help="Collect garbage for all tags.",
help="Keep data files for all git tags.",
)
gc_parser.add_argument(
"-c",
@@ -79,7 +83,7 @@ def add_parser(subparsers, parent_parser):
"--force",
action="store_true",
default=False,
help="Force garbage collection.",
help="Force garbage collection - automatically agree to all prompts.",
)
gc_parser.add_argument(
"-j",
@@ -95,6 +99,8 @@ def add_parser(subparsers, parent_parser):
type=str,
nargs="*",
default=None,
help="Collect garbage for all given projects.",
help="Keep data files required by these projects "
"in addition to the current one. "
"Useful if you share a single cache across repos.",
)
gc_parser.set_defaults(func=CmdGC)