apply: make some parsing functions static again
authorChristian Couder <christian.couder@gmail.com>
Sun, 4 Sep 2016 20:18:23 +0000 (22:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Sep 2016 19:29:53 +0000 (12:29 -0700)
Some parsing functions that were used in both "apply.c" and
"builtin/apply.c" are now only used in the former, so they
can be made static to "apply.c".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
apply.h
diff --git a/apply.c b/apply.c
index 5e3780d281f838580cce02ca4d06e1b2382ab84a..98c7f6e1100b899ca5266b797d41aa4a7465f3f5 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -27,7 +27,7 @@ static void git_apply_config(void)
        git_config(git_default_config, NULL);
 }
 
-int parse_whitespace_option(struct apply_state *state, const char *option)
+static int parse_whitespace_option(struct apply_state *state, const char *option)
 {
        if (!option) {
                state->ws_error_action = warn_on_ws_error;
@@ -57,8 +57,8 @@ int parse_whitespace_option(struct apply_state *state, const char *option)
        return error(_("unrecognized whitespace option '%s'"), option);
 }
 
-int parse_ignorewhitespace_option(struct apply_state *state,
-                                 const char *option)
+static int parse_ignorewhitespace_option(struct apply_state *state,
+                                                const char *option)
 {
        if (!option || !strcmp(option, "no") ||
            !strcmp(option, "false") || !strcmp(option, "never") ||
diff --git a/apply.h b/apply.h
index 28cbe6c990d9d8a83676a5238494bf3b011963be..51b983bf7ddcfa85fce48d60451c532353987dde 100644 (file)
--- a/apply.h
+++ b/apply.h
@@ -97,11 +97,6 @@ struct apply_state {
        int applied_after_fixing_ws;
 };
 
-extern int parse_whitespace_option(struct apply_state *state,
-                                  const char *option);
-extern int parse_ignorewhitespace_option(struct apply_state *state,
-                                        const char *option);
-
 extern int apply_option_parse_exclude(const struct option *opt,
                                      const char *arg, int unset);
 extern int apply_option_parse_include(const struct option *opt,