]> git.ipfire.org Git - thirdparty/git.git/commitdiff
config: fix typo in variable name
authorMatthew Rogers <mattr94@gmail.com>
Fri, 24 Jan 2020 00:21:01 +0000 (00:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Jan 2020 18:42:13 +0000 (10:42 -0800)
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>
builtin/config.c

index 98d65bc0ad4fd4bee8bd2755b9d7444d9862eae8..52a904cfb1ee654e16aa5a6a038e749b6b145750 100644 (file)
@@ -29,7 +29,7 @@ static int use_worktree_config;
 static struct git_config_source given_config_source;
 static int actions, type;
 static char *default_value;
-static int end_null;
+static int end_nul;
 static int respect_includes_opt = -1;
 static struct config_options config_options;
 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, "expiry-date", &type, N_("value is an expiry date"), TYPE_EXPIRY_DATE),
        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, "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)")),
@@ -178,11 +178,11 @@ static void check_argc(int argc, int min, int max)
 
 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_addch(buf, ':');
-       if (end_null)
+       if (end_nul)
                strbuf_addstr(buf, current_config_name());
        else
                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();
        }
 
-       if (end_null) {
+       if (end_nul) {
                term = '\0';
                delim = '\n';
                key_delim = '\n';