Thread (1 message) 1 message, 1 author, 2020-08-18

Re: [PATCH 1/3] Make refs_ref_exists public

From: Junio C Hamano <hidden>
Date: 2020-08-18 20:39:35

"Han-Wen Nienhuys via GitGitGadget" [off-list ref] writes:
Subject: Re: [PATCH 1/3] Make refs_ref_exists public
Documentation/SubmittingPatches[[describe-changes]]

Applies to all three patches and probably other recent topics from
you.
quoted hunk
From: Han-Wen Nienhuys <redacted>

Signed-off-by: Han-Wen Nienhuys <redacted>
---
 refs.c | 2 +-
 refs.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index cf91711968..d46080f4b6 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 29e28124cd..04bd25019f 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help