summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:18 (GMT)
commitc9aac55c4e99302e1e365e480eb52c3da2d7c853 (patch)
tree2091d68f18dda658a10438e29ce53dad2e838104 /git.c
parent4a3bf32b6c7e5d832e02f30a78ad23dc6ba15dcc (diff)
parent7213c288187bd9ef1e32e4f86c20c55436f1ae90 (diff)
downloadgit-c9aac55c4e99302e1e365e480eb52c3da2d7c853.zip
git-c9aac55c4e99302e1e365e480eb52c3da2d7c853.tar.gz
git-c9aac55c4e99302e1e365e480eb52c3da2d7c853.tar.bz2
Merge branch 'js/no-pager-shorthand'
"git --no-pager cmd" did not have short-and-sweet single letter option. Now it does. * js/no-pager-shorthand: git: add -P as a short option for --no-pager
Diffstat (limited to 'git.c')
-rw-r--r--git.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/git.c b/git.c
index bab6bbf..5771d62 100644
--- a/git.c
+++ b/git.c
@@ -25,7 +25,7 @@ struct cmd_struct {
const char git_usage_string[] =
N_("git [--version] [--help] [-C <path>] [-c <name>=<value>]\n"
" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
- " [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\n"
+ " [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n"
" [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n"
" <command> [<args>]");
@@ -99,7 +99,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
exit(0);
} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
use_pager = 1;
- } else if (!strcmp(cmd, "--no-pager")) {
+ } else if (!strcmp(cmd, "-P") || !strcmp(cmd, "--no-pager")) {
use_pager = 0;
if (envchanged)
*envchanged = 1;