mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
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:
committed by
Ruslan Kuprieiev
parent
63f87ba9fe
commit
220b4b26a2
+11
-5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user