refs: make some ref_store lookup functions private

The following functions currently don't need to be exposed: * ref_store_init() * lookup_ref_store() That might change in the future, but for now make them private. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Feb 10, 2017 at 12:16 UTC c468da4e2796868362c2f33b499d9bb6d6cd7043
2 files changed +17 -21
refs.c
+17 -2
@@ -1358,7 +1358,15 @@ static struct ref_store *main_ref_store;
1358 /* A linked list of ref_stores for submodules: */
1359 static struct ref_store *submodule_ref_stores;
1360
1361 -struct ref_store *lookup_ref_store(const char *submodule)
1361 +/*
1362 + * Return the ref_store instance for the specified submodule (or the
1363 + * main repository if submodule is NULL). If that ref_store hasn't
1364 + * been initialized yet, return NULL.
1365 + *
1366 + * For backwards compatibility, submodule=="" is treated the same as
1367 + * submodule==NULL.
1368 + */
1369 +static struct ref_store *lookup_ref_store(const char *submodule)
1370 {
1371 struct ref_store *refs;
1372
@@ -1373,7 +1381,14 @@ struct ref_store *lookup_ref_store(const char *submodule)
1381 return NULL;
1382 }
1383
1376 -struct ref_store *ref_store_init(const char *submodule)
1384 +/*
1385 + * Create, record, and return a ref_store instance for the specified
1386 + * submodule (or the main repository if submodule is NULL).
1387 + *
1388 + * For backwards compatibility, submodule=="" is treated the same as
1389 + * submodule==NULL.
1390 + */
1391 +static struct ref_store *ref_store_init(const char *submodule)
1392 {
1393 const char *be_name = "files";
1394 struct ref_storage_be *be = find_ref_storage_backend(be_name);
refs/refs-internal.h
-19
@@ -652,25 +652,6 @@ void base_ref_store_init(struct ref_store *refs,
652 const struct ref_storage_be *be,
653 const char *submodule);
654
655 -/*
656 - * Create, record, and return a ref_store instance for the specified
657 - * submodule (or the main repository if submodule is NULL).
658 - *
659 - * For backwards compatibility, submodule=="" is treated the same as
660 - * submodule==NULL.
661 - */
662 -struct ref_store *ref_store_init(const char *submodule);
663 -
664 -/*
665 - * Return the ref_store instance for the specified submodule (or the
666 - * main repository if submodule is NULL). If that ref_store hasn't
667 - * been initialized yet, return NULL.
668 - *
669 - * For backwards compatibility, submodule=="" is treated the same as
670 - * submodule==NULL.
671 - */
672 -struct ref_store *lookup_ref_store(const char *submodule);
673 -
655 /*
656 * Return the ref_store instance for the specified submodule. For the
657 * main repository, use submodule==NULL; such a call cannot fail. For