Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> --- refs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index 91a2940..09b68e4 100644 --- a/refs.c +++ b/refs.c @@ -1282,10 +1282,9 @@ int peel_ref(const char *refname, unsigned char *sha1) return -1; if ((flag & REF_ISPACKED)) { - struct ref_dir *dir = get_packed_refs(get_ref_cache(NULL)); - struct ref_entry *r = find_ref(dir, refname); + struct ref_entry *r = get_packed_ref(refname); - if (r != NULL && r->flag & REF_KNOWS_PEELED) { + if (r && (r->flag & REF_KNOWS_PEELED)) { hashcpy(sha1, r->u.value.peeled); return 0; } -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html