From 220b4b26a228b6bc2c43974effb5ff4dacd4926b Mon Sep 17 00:00:00 2001 From: Guy Smoilov <611655+guysmoilov@users.noreply.github.com> Date: Sat, 23 Feb 2019 09:39:03 +0200 Subject: [PATCH] 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 --- dvc/command/gc.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dvc/command/gc.py b/dvc/command/gc.py index 1b42e0f10..56c5840af 100644 --- a/dvc/command/gc.py +++ b/dvc/command/gc.py @@ -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)