From 612dd94e10858c7d73434f048ef2362ec9cc8b41 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 7 Aug 2020 15:43:08 -0500 Subject: [PATCH 1/3] 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 --- dvc/command/check_ignore.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dvc/command/check_ignore.py b/dvc/command/check_ignore.py index e28f4f19b4..cc31238dfe 100644 --- a/dvc/command/check_ignore.py +++ b/dvc/command/check_ignore.py @@ -82,7 +82,9 @@ def run(self): 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", @@ -122,9 +124,6 @@ def add_parser(subparsers, parent_parser): "Only usable when `--details` is also employed", ) parser.add_argument( - "targets", - nargs="*", - help="Exact or wildcard paths of files or directories to check " - "ignore patterns.", + "targets", nargs="*", help="File or directory paths to check", ).complete = completion.FILE parser.set_defaults(func=CmdCheckIgnore) From 605ed25df135a64c5410c7c69013d75512c23445 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 7 Aug 2020 18:47:39 -0500 Subject: [PATCH 2/3] check-ignore: more output string updates per #4323 et al. --- dvc/command/check_ignore.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/dvc/command/check_ignore.py b/dvc/command/check_ignore.py index cc31238dfe..150ac27a16 100644 --- a/dvc/command/check_ignore.py +++ b/dvc/command/check_ignore.py @@ -41,7 +41,7 @@ def _interactive_mode(self): target = ask("") if target == "": logger.info( - "Empty string is not a valid pathspec. Please use . " + "An empty string is not a valid path. Please use . " "instead if you meant to match all paths." ) break @@ -101,27 +101,26 @@ def add_parser(subparsers, parent_parser): help="Show the exclude pattern together with each target path.", ) parser.add_argument( - "-n", - "--non-matching", + "-a", + "--all", action="store_true", default=False, - help="Show the target paths which don’t match any pattern. " - "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( - "--stdin", + "-n", + "--non-matching", action="store_true", default=False, - help="Read pathnames from the standard input, one per line, " - "instead of from the command-line.", + help="Include the target paths which don’t match any pattern " + "in the `--details` list.", ) parser.add_argument( - "-a", - "--all", + "--stdin", action="store_true", default=False, - help="Show all of the patterns match the target paths. " - "Only usable when `--details` is also employed", + help="Read paths from standard input instead of providing `targets`.", ) parser.add_argument( "targets", nargs="*", help="File or directory paths to check", From 4d8168be9dbae0c5c601c64a77fc22a487cfe19b Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Fri, 7 Aug 2020 21:31:09 -0500 Subject: [PATCH 3/3] check-ignore: min text update to match iterative/dvc.org/pull/1673 --- dvc/command/check_ignore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/command/check_ignore.py b/dvc/command/check_ignore.py index 150ac27a16..68fc6feae6 100644 --- a/dvc/command/check_ignore.py +++ b/dvc/command/check_ignore.py @@ -98,7 +98,7 @@ def add_parser(subparsers, parent_parser): "--details", action="store_true", default=False, - help="Show the exclude pattern together with each target path.", + help="Show the exclude patterns along with each target path.", ) parser.add_argument( "-a",