Re: [PATCH 2/2] lock_ref_sha1_basic: handle REF_NODEREF with invalid refs
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> So instead, we attempt to resolve HEAD fully to get the old
> sha1, and only if that fails do we fallback to a
> non-recursive resolution. We lose nothing to the fallback,
> since we know the ref cannot be resolved, and thus we have
> no old sha1 in the first place. And we still get the benefit
> of the d/f-checking for the symref itself.
>
> This does mean an extra round of filesystem lookups in some
> cases, but they should be rare. It only kicks in with
> REF_NODEREF, and then only when the existing ref cannot be
> resolved.
Makes perfect sense to me. Thanks.