From 3c0cb0cbaef699f699b79c8be716086053760ea9 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Thu, 9 Feb 2017 21:53:52 +0100 Subject: read_loose_refs(): read refs using resolve_ref_recursively() There is no need to call read_ref_full() or resolve_gitlink_ref() from read_loose_refs(), because we already have a ref_store object in hand. So we can call resolve_ref_recursively() ourselves. Happily, this unifies the code for the submodule vs. non-submodule cases. This requires resolve_ref_recursively() to be exposed to the refs subsystem, though not to non-refs code. Signed-off-by: Michael Haggerty Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- refs/refs-internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'refs/refs-internal.h') diff --git a/refs/refs-internal.h b/refs/refs-internal.h index 793c850e98..33adbf93b5 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -650,4 +650,9 @@ void base_ref_store_init(struct ref_store *refs, */ struct ref_store *get_ref_store(const char *submodule); +const char *resolve_ref_recursively(struct ref_store *refs, + const char *refname, + int resolve_flags, + unsigned char *sha1, int *flags); + #endif /* REFS_REFS_INTERNAL_H */ -- cgit v1.2.3