[v19,05/20] Make refs_ref_exists public
diff mbox series

Message ID c8cf2d2ce11855aeca9e33bdd372722b5436d71e.1593457018.git.gitgitgadget@gmail.com
State New
Headers show
Series
  • Reftable support git-core
Related show

Commit Message

Derrick Stolee via GitGitGadget June 29, 2020, 6:56 p.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 refs.c | 2 +-
 refs.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/refs.c b/refs.c
index 1e9d893191..0363ddbeeb 100644
--- a/refs.c
+++ b/refs.c
@@ -313,7 +313,7 @@  int read_ref(const char *refname, struct object_id *oid)
 	return read_ref_full(refname, RESOLVE_REF_READING, oid, NULL);
 }
 
-static int refs_ref_exists(struct ref_store *refs, const char *refname)
+int refs_ref_exists(struct ref_store *refs, const char *refname)
 {
 	return !!refs_resolve_ref_unsafe(refs, refname, RESOLVE_REF_READING, NULL, NULL);
 }
diff --git a/refs.h b/refs.h
index 9ad1400aab..e9916ca6f0 100644
--- a/refs.h
+++ b/refs.h
@@ -105,6 +105,8 @@  int refs_verify_refname_available(struct ref_store *refs,
 				  const struct string_list *skip,
 				  struct strbuf *err);
 
+int refs_ref_exists(struct ref_store *refs, const char *refname);
+
 int ref_exists(const char *refname);
 
 int should_autocreate_reflog(const char *refname);