config: fix typo in variable name
In git config use of the end_null variable to determine if we should be null terminating our output. While it is correct to say a string is "null terminated" the character is actually the "nul" character, so this malapropism is being fixed. Signed-off-by: Matthew Rogers <mattr94@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d0654dc308
commit
329e6ec397
@ -29,7 +29,7 @@ static int use_worktree_config;
|
|||||||
static struct git_config_source given_config_source;
|
static struct git_config_source given_config_source;
|
||||||
static int actions, type;
|
static int actions, type;
|
||||||
static char *default_value;
|
static char *default_value;
|
||||||
static int end_null;
|
static int end_nul;
|
||||||
static int respect_includes_opt = -1;
|
static int respect_includes_opt = -1;
|
||||||
static struct config_options config_options;
|
static struct config_options config_options;
|
||||||
static int show_origin;
|
static int show_origin;
|
||||||
@ -151,7 +151,7 @@ static struct option builtin_config_options[] = {
|
|||||||
OPT_CALLBACK_VALUE(0, "path", &type, N_("value is a path (file or directory name)"), TYPE_PATH),
|
OPT_CALLBACK_VALUE(0, "path", &type, N_("value is a path (file or directory name)"), TYPE_PATH),
|
||||||
OPT_CALLBACK_VALUE(0, "expiry-date", &type, N_("value is an expiry date"), TYPE_EXPIRY_DATE),
|
OPT_CALLBACK_VALUE(0, "expiry-date", &type, N_("value is an expiry date"), TYPE_EXPIRY_DATE),
|
||||||
OPT_GROUP(N_("Other")),
|
OPT_GROUP(N_("Other")),
|
||||||
OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
|
OPT_BOOL('z', "null", &end_nul, N_("terminate values with NUL byte")),
|
||||||
OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),
|
OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),
|
||||||
OPT_BOOL(0, "includes", &respect_includes_opt, N_("respect include directives on lookup")),
|
OPT_BOOL(0, "includes", &respect_includes_opt, N_("respect include directives on lookup")),
|
||||||
OPT_BOOL(0, "show-origin", &show_origin, N_("show origin of config (file, standard input, blob, command line)")),
|
OPT_BOOL(0, "show-origin", &show_origin, N_("show origin of config (file, standard input, blob, command line)")),
|
||||||
@ -178,11 +178,11 @@ static void check_argc(int argc, int min, int max)
|
|||||||
|
|
||||||
static void show_config_origin(struct strbuf *buf)
|
static void show_config_origin(struct strbuf *buf)
|
||||||
{
|
{
|
||||||
const char term = end_null ? '\0' : '\t';
|
const char term = end_nul ? '\0' : '\t';
|
||||||
|
|
||||||
strbuf_addstr(buf, current_config_origin_type());
|
strbuf_addstr(buf, current_config_origin_type());
|
||||||
strbuf_addch(buf, ':');
|
strbuf_addch(buf, ':');
|
||||||
if (end_null)
|
if (end_nul)
|
||||||
strbuf_addstr(buf, current_config_name());
|
strbuf_addstr(buf, current_config_name());
|
||||||
else
|
else
|
||||||
quote_c_style(current_config_name(), buf, NULL, 0);
|
quote_c_style(current_config_name(), buf, NULL, 0);
|
||||||
@ -678,7 +678,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
|
|||||||
config_options.git_dir = get_git_dir();
|
config_options.git_dir = get_git_dir();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end_null) {
|
if (end_nul) {
|
||||||
term = '\0';
|
term = '\0';
|
||||||
delim = '\n';
|
delim = '\n';
|
||||||
key_delim = '\n';
|
key_delim = '\n';
|
||||||
|
Reference in New Issue
Block a user