From: Junio C Hamano Date: Thu, 04 Oct 2012 18:24:43 GMT Subject: Re: [PATCH 1/4] peel_ref: use faster deref_tag_noverify Message-ID: <7vk3v6yu1g.fsf@alter.siamese.dyndns.org> In-Reply-To: <20121004075815.GA31325@sigill.intra.peff.net> Jeff King writes: > When we are asked to peel a ref to a sha1, we internally call > deref_tag, which will recursively parse each tagged object > until we reach a non-tag. This has the benefit that we will > verify our ability to load and parse the pointed-to object. > > However, there is a performance downside: we may not need to > load that object at all (e.g., if we are listing peeled > simply listing peeled refs),... Both correct. I checked the existing callsites and nobody seems to assume that it can use the pointed-to object without checking because peel_ref has already checked, so it makes sense.