From 67be7c5a593da8905added96723448d28b4a1812 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Fri, 23 Jun 2017 09:01:37 +0200 Subject: packed-backend: new module for handling packed references Now that the interface between `files_ref_store` and `packed_ref_store` is relatively narrow, move the latter into a new module, "refs/packed-backend.h" and "refs/packed-backend.c". It still doesn't quite implement the `ref_store` interface, but it will soon. This commit moves code around and adjusts its visibility, but doesn't change anything. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs/refs-internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'refs/refs-internal.h') diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 192f9f85c9..6f8f9f5619 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -77,6 +77,15 @@ */ int refname_is_safe(const char *refname); +/* + * Helper function: return true if refname, which has the specified + * oid and flags, can be resolved to an object in the database. If the + * referred-to object does not exist, emit a warning and return false. + */ +int ref_resolves_to_object(const char *refname, + const struct object_id *oid, + unsigned int flags); + enum peel_status { /* object was peeled successfully: */ PEEL_PEELED = 0, -- cgit v1.2.3