summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-04-10 16:28:20 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-10 16:28:20 +0900
commit62c0fd46a875050e904831a73ef4375ed26cfaf6 (patch)
tree9bb09418c52e02a93f55c62826574ad26ac20f5b /builtin
parentThe first batch for 2.18 cycle (diff)
parentparse-options: do not show usage upon invalid option value (diff)
downloadtgif-62c0fd46a875050e904831a73ef4375ed26cfaf6.tar.xz
Merge branch 'ps/contains-id-error-message'
"git tag --contains no-such-commit" gave a full list of options after giving an error message. * ps/contains-id-error-message: parse-options: do not show usage upon invalid option value
Diffstat (limited to 'builtin')
-rw-r--r--builtin/blame.c1
-rw-r--r--builtin/shortlog.c1
-rw-r--r--builtin/update-index.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/builtin/blame.c b/builtin/blame.c
index f1a2fd6702..db38c0b307 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -729,6 +729,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
for (;;) {
switch (parse_options_step(&ctx, options, blame_opt_usage)) {
case PARSE_OPT_HELP:
+ case PARSE_OPT_ERROR:
exit(129);
case PARSE_OPT_DONE:
if (ctx.argv[0])
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 3a823b3128..608d6ba77b 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -284,6 +284,7 @@ int cmd_shortlog(int argc, const char **argv, const char *prefix)
for (;;) {
switch (parse_options_step(&ctx, options, shortlog_usage)) {
case PARSE_OPT_HELP:
+ case PARSE_OPT_ERROR:
exit(129);
case PARSE_OPT_DONE:
goto parse_done;
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 9625d1e10a..10d070a76f 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1059,6 +1059,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
break;
switch (parseopt_state) {
case PARSE_OPT_HELP:
+ case PARSE_OPT_ERROR:
exit(129);
case PARSE_OPT_NON_OPTION:
case PARSE_OPT_DONE: