Skip to content

Commit 329e6ec

Browse files
ROGERSM94gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0654dc commit 329e6ec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

builtin/config.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static int use_worktree_config;
2929
static struct git_config_source given_config_source;
3030
static int actions, type;
3131
static char *default_value;
32-
static int end_null;
32+
static int end_nul;
3333
static int respect_includes_opt = -1;
3434
static struct config_options config_options;
3535
static int show_origin;
@@ -151,7 +151,7 @@ static struct option builtin_config_options[] = {
151151
OPT_CALLBACK_VALUE(0, "path", &type, N_("value is a path (file or directory name)"), TYPE_PATH),
152152
OPT_CALLBACK_VALUE(0, "expiry-date", &type, N_("value is an expiry date"), TYPE_EXPIRY_DATE),
153153
OPT_GROUP(N_("Other")),
154-
OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
154+
OPT_BOOL('z', "null", &end_nul, N_("terminate values with NUL byte")),
155155
OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),
156156
OPT_BOOL(0, "includes", &respect_includes_opt, N_("respect include directives on lookup")),
157157
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)
178178

179179
static void show_config_origin(struct strbuf *buf)
180180
{
181-
const char term = end_null ? '\0' : '\t';
181+
const char term = end_nul ? '\0' : '\t';
182182

183183
strbuf_addstr(buf, current_config_origin_type());
184184
strbuf_addch(buf, ':');
185-
if (end_null)
185+
if (end_nul)
186186
strbuf_addstr(buf, current_config_name());
187187
else
188188
quote_c_style(current_config_name(), buf, NULL, 0);
@@ -678,7 +678,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
678678
config_options.git_dir = get_git_dir();
679679
}
680680

681-
if (end_null) {
681+
if (end_nul) {
682682
term = '\0';
683683
delim = '\n';
684684
key_delim = '\n';

0 commit comments

Comments
 (0)