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
@ -32,6 +32,7 @@
|
||||
#include "column.h"
|
||||
#include "sequencer.h"
|
||||
#include "mailmap.h"
|
||||
#include "help.h"
|
||||
|
||||
static const char * const builtin_commit_usage[] = {
|
||||
N_("git commit [<options>] [--] <pathspec>..."),
|
||||
@ -1185,6 +1186,8 @@ static int dry_run_commit(int argc, const char **argv, const char *prefix,
|
||||
return commitable ? 0 : 1;
|
||||
}
|
||||
|
||||
define_list_config_array_extra(color_status_slots, {"added"});
|
||||
|
||||
static int parse_status_slot(const char *slot)
|
||||
{
|
||||
if (!strcasecmp(slot, "added"))
|
||||
|
||||
Reference in New Issue
Block a user