Re: [PATCH] commit: check result of resolve_ref_unsafe
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 19, 2017, 00:41 UTC
- Message-ID
- <xmqqo9p4j7eu.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171018183453.lr67zw455bkdmrlz@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> Tangential to your patch, I also wondered why we did not pass > RESOLVE_REF_READING to resolve_ref_unsafe(). I think the answer is that > for symref lookups, we normally don't pass it so that we can handle > dangling symrefs. Of course we _just_ wrote HEAD ourselves, so we'd > expect it to exist, so it shouldn't really matter either way.
If we do expect it to exist, shouldn't we checking with READING and catching a funny situation if it arises?