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>
Matthew Rogers committed
Jan 24, 2020 at 00:21 UTC
329e6ec39726594117dbc95a9f38aa145add78d3
1 file changed
+5
-5
builtin/config.c
+5
-5
@@ -29,7 +29,7 @@ static int use_worktree_config;
29
static struct git_config_source given_config_source;
30
static int actions, type;
31
static char *default_value;
32
-static int end_null;
32
+static int end_nul;
33
static int respect_includes_opt = -1;
34
static struct config_options config_options;
35
static int show_origin;
@@ -151,7 +151,7 @@ static struct option builtin_config_options[] = {
151
OPT_CALLBACK_VALUE(0, "path", &type, N_("value is a path (file or directory name)"), TYPE_PATH),
152
OPT_CALLBACK_VALUE(0, "expiry-date", &type, N_("value is an expiry date"), TYPE_EXPIRY_DATE),
153
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")),
155
OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),
156
OPT_BOOL(0, "includes", &respect_includes_opt, N_("respect include directives on lookup")),
157
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)
178
179
static void show_config_origin(struct strbuf *buf)
180
{
181
- const char term = end_null ? '\0' : '\t';
181
+ const char term = end_nul ? '\0' : '\t';
182
183
strbuf_addstr(buf, current_config_origin_type());
184
strbuf_addch(buf, ':');
185
- if (end_null)
185
+ if (end_nul)
186
strbuf_addstr(buf, current_config_name());
187
else
188
quote_c_style(current_config_name(), buf, NULL, 0);
@@ -678,7 +678,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
678
config_options.git_dir = get_git_dir();
679
}
680
681
- if (end_null) {
681
+ if (end_nul) {
682
term = '\0';
683
delim = '\n';
684
key_delim = '\n';