summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorLibravatar Han-Wen Nienhuys <hanwen@google.com>2020-08-21 16:59:34 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-08-21 11:20:10 -0700
commit3f9f1acccf32fb1feda0f7ea8533bed2b594b1a0 (patch)
tree1f14519211659fab9cf1af99750e09efcf722f25 /refs.c
parentrefs: read FETCH_HEAD and MERGE_HEAD generically (diff)
downloadtgif-3f9f1acccf32fb1feda0f7ea8533bed2b594b1a0.tar.xz
refs: make refs_ref_exists public
This will be necessary to replace file existence checks for pseudorefs. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index a2777793cf..34996fd654 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);
}