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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a46baac61e
commit
3ac68a93fd
@ -22,6 +22,7 @@
|
||||
#include "wt-status.h"
|
||||
#include "ref-filter.h"
|
||||
#include "worktree.h"
|
||||
#include "help.h"
|
||||
|
||||
static const char * const builtin_branch_usage[] = {
|
||||
N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
|
||||
@ -67,6 +68,8 @@ static const char *color_branch_slots[] = {
|
||||
static struct string_list output = STRING_LIST_INIT_DUP;
|
||||
static unsigned int colopts;
|
||||
|
||||
define_list_config_array(color_branch_slots);
|
||||
|
||||
static int git_branch_config(const char *var, const char *value, void *cb)
|
||||
{
|
||||
const char *slot_name;
|
||||
|
Reference in New Issue
Block a user