aboutsummaryrefslogtreecommitdiffstats
path: root/parse-options.h
diff options
context:
space:
mode:
authorPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>2018-03-22 20:43:51 +0200
committerJunio C Hamano <gitster@pobox.com>2018-03-22 12:10:08 -0700
commit3bb0923f06c55ea44569f547cefa9e1a59069ff2 (patch)
tree9667154be2d13f516298897c4b132191db38b6f4 /parse-options.h
parent38e79b1fdab9244e1727d0698afcf3bb8956c0a4 (diff)
downloadgit-3bb0923f06c55ea44569f547cefa9e1a59069ff2.tar.gz
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 <ungureanupaulsebastian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h1
1 files changed, 1 insertions, 0 deletions
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
};