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
This commit is contained in:
@ -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])
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user