Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-08 22:07:44 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-09 00:13:11 +0300
commit28794ec72e284ba398b562bc117e091853ef0332 (patch)
treeb7cae7b474d6bf5647025b06d9780c298c5bd241 /parse-options.c
parent13d9fcec293ad988c94e81ca7ccc58c76993093a (diff)
parse-options.[ch]: make opt{bug,name}() "static"
Change these two functions to "static", the last user of "optname()" outside of parse-options.c itself went away in the preceding commit, for the reasons noted in 9440b831ad5 (parse-options: replace opterror() with optname(), 2018-11-10) we shouldn't be adding any more users of it. The "optbug()" function was never used outside of parse-options.c, but was made non-static in 1f275b7c4ca (parse-options: export opterr, optbug, 2011-08-11). I think the only external user of optname() was the commit-graph.c caller added in 09e0327f57 (builtin/commit-graph.c: introduce '--max-new-filters=<n>', 2020-09-18). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-options.c b/parse-options.c
index 9e2da8383d..64bd4c3285 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -11,7 +11,7 @@ static int disallow_abbreviated_options;
#define OPT_SHORT 1
#define OPT_UNSET 2
-int optbug(const struct option *opt, const char *reason)
+static int optbug(const struct option *opt, const char *reason)
{
if (opt->long_name) {
if (opt->short_name)
@@ -22,7 +22,7 @@ int optbug(const struct option *opt, const char *reason)
return error("BUG: switch '%c' %s", opt->short_name, reason);
}
-const char *optname(const struct option *opt, int flags)
+static const char *optname(const struct option *opt, int flags)
{
static struct strbuf sb = STRBUF_INIT;