]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
read_loose_refs(): read refs using resolve_ref_recursively()
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 9 Feb 2017 20:53:52 +0000 (21:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Feb 2017 23:14:15 +0000 (15:14 -0800)
commit3c0cb0cbaef699f699b79c8be716086053760ea9
treee438fab5d0d8cf500c074b4e3b6db3a01f44afea
parent9c7d772b6b716ec5f81afd3922340588985066b8
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 <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs/files-backend.c
refs/refs-internal.h