From 3bb0923f06c55ea44569f547cefa9e1a59069ff2 Mon Sep 17 00:00:00 2001 From: Paul-Sebastian Ungureanu Date: Thu, 22 Mar 2018 20:43:51 +0200 Subject: parse-options: do not show usage upon invalid option value Usually, the usage should be shown only if the user does not know what options are available. If the user specifies an invalid value, the user is already aware of the available options. In this case, there is no point in displaying the usage anymore. This patch applies to "git tag --contains", "git branch --contains", "git branch --points-at", "git for-each-ref --contains" and many more. Signed-off-by: Paul-Sebastian Ungureanu Signed-off-by: Junio C Hamano --- parse-options.h | 1 + 1 file changed, 1 insertion(+) (limited to 'parse-options.h') diff --git a/parse-options.h b/parse-options.h index af711227ae..c77bb3b4f8 100644 --- a/parse-options.h +++ b/parse-options.h @@ -188,6 +188,7 @@ enum { PARSE_OPT_HELP = -1, PARSE_OPT_DONE, PARSE_OPT_NON_OPTION, + PARSE_OPT_ERROR, PARSE_OPT_UNKNOWN }; -- cgit v1.2.3