summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-04-10 07:28:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-04-10 07:28:20 (GMT)
commit62c0fd46a875050e904831a73ef4375ed26cfaf6 (patch)
tree9bb09418c52e02a93f55c62826574ad26ac20f5b /builtin
parent69d71ec4433d21f464d83b529432856da2387bba (diff)
parent3bb0923f06c55ea44569f547cefa9e1a59069ff2 (diff)
downloadgit-62c0fd46a875050e904831a73ef4375ed26cfaf6.zip
git-62c0fd46a875050e904831a73ef4375ed26cfaf6.tar.gz
git-62c0fd46a875050e904831a73ef4375ed26cfaf6.tar.bz2
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 f1a2fd6..db38c0b 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 3a823b3..608d6ba 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 9625d1e..10d070a 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: