]> git.ipfire.org Git - thirdparty/git.git/commitdiff
serve: mark has_capability() as static
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 5 Aug 2021 01:25:34 +0000 (03:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Aug 2021 15:59:36 +0000 (08:59 -0700)
The has_capability() function introduced in ed10cb952d3 (serve:
introduce git-serve, 2018-03-15) has never been used anywhere except
serve.c, so let's mark it as static.

It was later changed from "extern" in 554544276a6 (*.[ch]: remove
extern from function declarations using spatch, 2019-04-29), but we
could have simply marked it as "static" instead.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
serve.c
serve.h

diff --git a/serve.c b/serve.c
index f11c0e07c45fc2653c4204bafbf04473358444fb..7bf5f23ea6a751172488259b0999fa16d8653252 100644 (file)
--- a/serve.c
+++ b/serve.c
@@ -156,8 +156,8 @@ static int is_command(const char *key, struct protocol_capability **command)
        return 0;
 }
 
-int has_capability(const struct strvec *keys, const char *capability,
-                  const char **value)
+static int has_capability(const struct strvec *keys, const char *capability,
+                         const char **value)
 {
        int i;
        for (i = 0; i < keys->nr; i++) {
diff --git a/serve.h b/serve.h
index fc2683e24d30577c41d4800239bf19b134316140..56da77a87af40f1f81e6382bc0c1488628f649f3 100644 (file)
--- a/serve.h
+++ b/serve.h
@@ -1,10 +1,6 @@
 #ifndef SERVE_H
 #define SERVE_H
 
-struct strvec;
-int has_capability(const struct strvec *keys, const char *capability,
-                  const char **value);
-
 struct serve_options {
        unsigned advertise_capabilities;
        unsigned stateless_rpc;