diff --git a/dvc/command/gc.py b/dvc/command/gc.py index 67c0927d2e..b4b710ae73 100644 --- a/dvc/command/gc.py +++ b/dvc/command/gc.py @@ -80,27 +80,27 @@ def add_parser(subparsers, parent_parser): "--workspace", action="store_true", default=False, - help="Keep data files used in the current workspace.", + help="Keep data files used in the current workspace (working tree).", ) gc_parser.add_argument( "-a", "--all-branches", action="store_true", default=False, - help="Keep data files for the tips of all git 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="Keep data files for all git tags.", + help="Keep data files for all Git tags.", ) gc_parser.add_argument( "--all-commits", action="store_true", default=False, - help=argparse.SUPPRESS, + help="Keep data files for all Git commits.", ) gc_parser.add_argument( "-c", diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 5912d5dc57..5850f0f56b 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -229,7 +229,7 @@ def used_cache( (namely, a file described as an output on a stage). The scope is, by default, the working directory, but you can use - `all_branches` or `all_tags` to expand scope. + `all_branches`/`all_tags`/`all_commits` to expand the scope. Returns: A dictionary with Schemes (representing output's location) as keys, diff --git a/dvc/repo/brancher.py b/dvc/repo/brancher.py index 955b135135..67a3b19b36 100644 --- a/dvc/repo/brancher.py +++ b/dvc/repo/brancher.py @@ -9,9 +9,9 @@ def brancher( # noqa: E302 """Generator that iterates over specified revisions. Args: - branches (list): a list of branches to iterate over. + revs (list): a list of revisions to iterate over. all_branches (bool): iterate over all available branches. - tags (list): a list of tags to iterate over. + all_commits (bool): iterate over all commits. all_tags (bool): iterate over all available tags. Yields: diff --git a/scripts/completion/dvc.bash b/scripts/completion/dvc.bash index 004685410c..135f706619 100644 --- a/scripts/completion/dvc.bash +++ b/scripts/completion/dvc.bash @@ -26,7 +26,7 @@ _dvc_fetch='-j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps _dvc_fetch_COMPGEN=_dvc_compgen_DVCFiles _dvc_get_url='' _dvc_get='-o --out --rev --show-url' -_dvc_gc='-a --all-branches -T --all-tags -c --cloud -r --remote -f --force -p --projects -j --jobs' +_dvc_gc='-a --all-branches --all-commits -T --all-tags -w --workspace -c --cloud -r --remote -f --force -p --projects -j --jobs' _dvc_import_url='-f --file' _dvc_import='-o --out --rev' _dvc_init='--no-scm -f --force' diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index af97520e00..49c9ecf22d 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -128,8 +128,10 @@ _dvc_get=( ) _dvc_gc=( - {-a,--all-branches}"[Keep data files for the tips of all git branches.]" - {-T,--all-tags}"[Keep data files for all git tags.]" + {-w,--workspace}"[Keep data files used in the current workspace (working tree).]" + {-a,--all-branches}"[Keep data files for the tips of all Git branches.]" + "--all-commits[Keep data files for all Git commits.]" + {-T,--all-tags}"[Keep data files for all Git tags.]" {-c,--cloud}"[Collect garbage in remote repository.]" {-r,--remote}"[Remote storage to collect garbage in.]:Remote repository:" {-f,--force}"[Force garbage collection - automatically agree to all prompts.]:Repos:_files"