From 3ac68a93fd2b984e2a7e570217d2646a208ffcc3 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Sat, 26 May 2018 15:55:24 +0200 Subject: help: add --config to list all available config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes it helps to list all available config vars so the user can search for something they want. The config man page can also be used but it's harder to search if you want to focus on the variable name, for example. This is not the best way to collect the available config since it's not precise. Ideally we should have a centralized list of config in C code (pretty much like 'struct option'), but that's a lot more work. This will do for now. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/clean.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'builtin/clean.c') diff --git a/builtin/clean.c b/builtin/clean.c index 0ccd95e693..ab402c204c 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -16,6 +16,7 @@ #include "column.h" #include "color.h" #include "pathspec.h" +#include "help.h" static int force = -1; /* unset */ static int interactive; @@ -91,6 +92,8 @@ struct menu_stuff { void *stuff; }; +define_list_config_array(color_interactive_slots); + static int git_clean_config(const char *var, const char *value, void *cb) { const char *slot_name; -- cgit v1.3-6-g1900