summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 225a9ca)
raw | patch | inline | side by side (parent: 225a9ca)
author | Felipe Contreras <felipe.contreras@gmail.com> | |
Sat, 21 Feb 2009 00:49:29 +0000 (02:49 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 22 Feb 2009 04:37:48 +0000 (20:37 -0800) |
Doing so would be incoherent since --get-color would pick a color slot
and ignore the variable type option (e.g. --bool), and the type would
require a variable name.
Suggested by Junio C Hamano.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
and ignore the variable type option (e.g. --bool), and the type would
require a variable name.
Suggested by Junio C Hamano.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-config.c | patch | blob | history |
diff --git a/builtin-config.c b/builtin-config.c
index a3a334bc63be837818119ab0ad50a2088c55cc6b..b11a0961bd974467c78274817261f26df2480622 100644 (file)
--- a/builtin-config.c
+++ b/builtin-config.c
if (get_colorbool_slot)
actions |= ACTION_GET_COLORBOOL;
+ if ((get_color_slot || get_colorbool_slot) && types) {
+ error("--get-color and variable type are incoherent");
+ usage_with_options(builtin_config_usage, builtin_config_options);
+ }
+
if (HAS_MULTI_BITS(actions)) {
error("only one action at a time.");
usage_with_options(builtin_config_usage, builtin_config_options);