From 9cb32b5d29ba56920b31a58f4ee01040c6ae81dd Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Tue, 11 Aug 2020 02:38:23 -0500 Subject: [PATCH] check-ignore: update help output (#4358) * check_ignore: update help output per https://github.com/iterative/dvc/pull/4282#pullrequestreview-460270636 and https://github.com/iterative/dvc/pull/4282#pullrequestreview-460272287 * check-ignore: more output string updates per #4323 et al. * check-ignore: min text update to match iterative/dvc.org/pull/1673 Co-authored-by: Ruslan Kuprieiev --- dvc/command/check_ignore.py | 44 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/dvc/command/check_ignore.py b/dvc/command/check_ignore.py index 97da662a3..436004b84 100644 --- a/dvc/command/check_ignore.py +++ b/dvc/command/check_ignore.py @@ -81,7 +81,9 @@ class CmdCheckIgnore(CmdBase): def add_parser(subparsers, parent_parser): - ADD_HELP = "Debug DVC ignore/exclude files" + ADD_HELP = ( + "Check whether files or directories are excluded due to `.dvcignore`." + ) parser = subparsers.add_parser( "check-ignore", @@ -95,35 +97,31 @@ def add_parser(subparsers, parent_parser): "--details", action="store_true", default=False, - help="Show the exclude pattern together with each target path.", - ) - parser.add_argument( - "-n", - "--non-matching", - action="store_true", - default=False, - help="Show the target paths which don’t match any pattern. " - "Only usable when `--details` is also employed", - ) - parser.add_argument( - "--stdin", - action="store_true", - default=False, - help="Read pathnames from the standard input, one per line, " - "instead of from the command-line.", + help="Show the exclude patterns along with each target path.", ) parser.add_argument( "-a", "--all", action="store_true", default=False, - help="Show all of the patterns match the target paths. " - "Only usable when `--details` is also employed", + help="Include the target paths which don’t match any pattern " + "in the `--details` list.", ) parser.add_argument( - "targets", - nargs="*", - help="Exact or wildcard paths of files or directories to check " - "ignore patterns.", + "-n", + "--non-matching", + action="store_true", + default=False, + help="Include the target paths which don’t match any pattern " + "in the `--details` list.", + ) + parser.add_argument( + "--stdin", + action="store_true", + default=False, + help="Read paths from standard input instead of providing `targets`.", + ) + parser.add_argument( + "targets", nargs="*", help="File or directory paths to check", ).complete = completion.FILE parser.set_defaults(func=CmdCheckIgnore)