summaryrefslogtreecommitdiffstats
path: root/subcmds/list.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2021-05-04 08:06:36 -0400
committerMike Frysinger <vapier@google.com>2021-05-04 16:40:53 +0000
commitc177f944d95c460803f8a894fd13d4901c3155fe (patch)
tree1645c1bcf6e2cd304600ebc1f5193a0edf329429 /subcmds/list.py
parentaedd1e5ef015fba194681e167edf460c21a1c980 (diff)
downloadgit-repo-c177f944d95c460803f8a894fd13d4901c3155fe.tar.gz
subcmds: force consistent help text format
We're inconsistent with help text as to whether it uses title case and whether it ends in a period. Add a test to enforce a standard, and use the style that Python optparse & argparse use themselves (e.g. with the --help option): always lowercase, and never trailing period. Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144 Reviewed-by: Raman Tenneti <rtenneti@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/list.py')
-rw-r--r--subcmds/list.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/list.py b/subcmds/list.py
index 5cbc0c22..68bcd5e0 100644
--- a/subcmds/list.py
+++ b/subcmds/list.py
@@ -36,22 +36,22 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'.
36 def _Options(self, p): 36 def _Options(self, p):
37 p.add_option('-r', '--regex', 37 p.add_option('-r', '--regex',
38 dest='regex', action='store_true', 38 dest='regex', action='store_true',
39 help="Filter the project list based on regex or wildcard matching of strings") 39 help='filter the project list based on regex or wildcard matching of strings')
40 p.add_option('-g', '--groups', 40 p.add_option('-g', '--groups',
41 dest='groups', 41 dest='groups',
42 help="Filter the project list based on the groups the project is in") 42 help='filter the project list based on the groups the project is in')
43 p.add_option('-a', '--all', 43 p.add_option('-a', '--all',
44 action='store_true', 44 action='store_true',
45 help='Show projects regardless of checkout state') 45 help='show projects regardless of checkout state')
46 p.add_option('-f', '--fullpath', 46 p.add_option('-f', '--fullpath',
47 dest='fullpath', action='store_true', 47 dest='fullpath', action='store_true',
48 help="Display the full work tree path instead of the relative path") 48 help='display the full work tree path instead of the relative path')
49 p.add_option('-n', '--name-only', 49 p.add_option('-n', '--name-only',
50 dest='name_only', action='store_true', 50 dest='name_only', action='store_true',
51 help="Display only the name of the repository") 51 help='display only the name of the repository')
52 p.add_option('-p', '--path-only', 52 p.add_option('-p', '--path-only',
53 dest='path_only', action='store_true', 53 dest='path_only', action='store_true',
54 help="Display only the path of the repository") 54 help='display only the path of the repository')
55 55
56 def ValidateOptions(self, opt, args): 56 def ValidateOptions(self, opt, args):
57 if opt.fullpath and opt.name_only: 57 if opt.fullpath and opt.name_only: