Skip to content

Commit 37b4bd2

Browse files
committed
Indicate values loaded from git-config
Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 231d10f commit 37b4bd2

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

git_pw/shell.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,20 @@
1717
@click.option('--debug', default=False, is_flag=True,
1818
help="Output more information about what's going on.")
1919
@click.option('--token', metavar='TOKEN', envvar='PW_TOKEN',
20-
help='Authentication token.')
20+
help="Authentication token. Defaults to the value of "
21+
"'git config pw.token'.")
2122
@click.option('--username', metavar='USERNAME', envvar='PW_USERNAME',
22-
help='Authentication username.')
23+
help="Authentication username. Defaults to the value of "
24+
"'git config pw.username'.")
2325
@click.option('--password', metavar='PASSWORD', envvar='PW_PASSWORD',
24-
help='Authentication password.')
26+
help="Authentication password. Defaults to the value of "
27+
"'git config pw.password'.")
2528
@click.option('--server', metavar='SERVER', envvar='PW_SERVER',
26-
help='Patchwork server address/hostname.')
29+
help="Patchwork server address/hostname. Defaults to the value "
30+
"of 'git config pw.server'.")
2731
@click.option('--project', metavar='PROJECT', envvar='PW_PROJECT',
28-
help='Patchwork project.')
32+
help="Patchwork project. Defaults the value of "
33+
"'git config pw.project'.")
2934
@click.version_option()
3035
def cli(debug, token, username, password, server, project):
3136
"""git-pw is a tool for integrating Git with Patchwork.

git_pw/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def _format_options(f):
174174
f = click.option('--format', '-f', 'fmt', envvar='PW_FORMAT',
175175
default=None,
176176
type=click.Choice(['simple', 'table', 'csv']),
177-
help='Output format. Defaults to table.')(f)
177+
help="Output format. Defaults to the value of "
178+
"'git config pw.server' else 'table'.")(f)
178179

179180
if headers:
180181
f = click.option('--column', '-c', 'headers', metavar='COLUMN',

0 commit comments

Comments
 (0)