path: root/log-tree.c
diff options
authorNguyễn Thái Ngọc Duy <>2018-05-26 13:55:24 (GMT)
committerJunio C Hamano <>2018-05-29 05:51:28 (GMT)
commit3ac68a93fd2b984e2a7e570217d2646a208ffcc3 (patch)
treea2daa2ec0763d187815899c677681ff7ccb6acf8 /log-tree.c
parenta46baac61ebc6a8b187f76bcd49b625e0d4f408e (diff)
help: add --config to list all available config
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 <>
Diffstat (limited to 'log-tree.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index d85e179..30706fe 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -12,6 +12,7 @@
#include "gpg-interface.h"
#include "sequencer.h"
#include "line-log.h"
+#include "help.h"
static struct decoration name_decoration = { "object names" };
static int decoration_loaded;
@@ -42,6 +43,8 @@ static const char *decorate_get_color(int decorate_use_color, enum decoration_ty
return "";
int parse_decorate_color_config(const char *var, const char *slot_name, const char *value)
int slot = LOOKUP_CONFIG(color_decorate_slots, slot_name);