gc: make --all-commits flag visible (#3429)

* gc: make --all-commits visible

* gc: fix help message and completion scripts

* bash: add longform --workspace flag
This commit is contained in:
Saugat Pachhai
2020-03-10 08:29:07 +05:45
committed by GitHub
parent 4bceb9d9cd
commit ea981ae955
5 changed files with 12 additions and 10 deletions
+4 -4
View File
@@ -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",
+1 -1
View File
@@ -228,7 +228,7 @@ class Repo(object):
(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,
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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'
+4 -2
View File
@@ -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"