git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] refs.[ch]: remove unused ref_storage_backend_exists()

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 28, 2021, 13:02 UTC
Message-ID
<patch-1.5-7a252061b51-20210928T130032Z-avarab@gmail.com>
In-Reply-To
<cover-0.5-00000000000-20210928T130032Z-avarab@gmail.com>

This function was added in 3dce444f178 (refs: add a backend method structure, 2016-09-04), but has never been used by anything. The only caller that might care uses find_ref_storage_backend() directly.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 refs.c | 5 -----
 refs.h | 2 --
 2 files changed, 7 deletions(-)
diff --git a/refs.c b/refs.c
index 8b9f7c3a80a..32349a5585f 100644
--- a/refs.c
+++ b/refs.c
@@ -33,11 +33,6 @@ static struct ref_storage_be *find_ref_storage_backend(const char *name)
 	return NULL;
 }
 
-int ref_storage_backend_exists(const char *name)
-{
-	return find_ref_storage_backend(name) != NULL;
-}
-
 /*
  * How to handle various characters in refnames:
  * 0: An acceptable character for refs
diff --git a/refs.h b/refs.h
index 48970dfc7e0..573b69863d3 100644
--- a/refs.h
+++ b/refs.h
@@ -836,8 +836,6 @@ int reflog_expire(const char *refname, const struct object_id *oid,
 		  reflog_expiry_cleanup_fn cleanup_fn,
 		  void *policy_cb_data);
 
-int ref_storage_backend_exists(const char *name);
-
 struct ref_store *get_main_ref_store(struct repository *r);
 
 /**
-- 
2.33.0.1340.ge9f77250f2b
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 2 of 8 in “refs: remove long-dead code”
  1. 0/5 refs: remove long-dead codeÆvar Arnfjörð Bjarmason, Sep 28, 2021
  2. 1/5 refs.[ch]: remove unused ref_storage_backend_exists()Ævar Arnfjörð Bjarmason, Sep 28, 2021
  3. 2/5 refs/ref-cache.[ch]: remove unused remove_entry_from_dir()Ævar Arnfjörð Bjarmason, Sep 28, 2021
  4. 3/5 refs/ref-cache.[ch]: remove unused add_ref_entry()Ævar Arnfjörð Bjarmason, Sep 28, 2021
  5. 4/5 refs/ref-cache.c: remove "mkdir" parameter from find_containing_dir()Ævar Arnfjörð Bjarmason, Sep 28, 2021
  6. 5/5 refs/ref-cache.[ch]: remove "incomplete" from create_dir_entry()Ævar Arnfjörð Bjarmason, Sep 28, 2021
  7. Jeff KingSep 28, 2021
  8. Junio C HamanoSep 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.