[v20,06/21] Make refs_ref_exists public
diff mbox series

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

Commit Message

Johannes Schindelin via GitGitGadget July 31, 2020, 3:27 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 947b51f781..5e65e79f24 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 f212f8945e..f8835f0aef 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);