From: Jeff King Date: Thu, 11 Oct 2018 17:52:10 GMT Subject: Re: [PATCH v2 1/1] branch: introduce --show-current display option Message-ID: <20181011175209.GB8825@sigill.intra.peff.net> In-Reply-To: <0f401a50-3c4c-5d09-a8b1-58ae80f5a210@umanovskis.se> On Thu, Oct 11, 2018 at 07:29:58PM +0200, Daniels Umanovskis wrote: > > Without passing the &flag argument, I do not think there is a > > reliable way to ask resolve_ref_unsafe() if "HEAD" is a symbolic > > ref. > > If I'm reading the code correctly, resolve_ref_unsafe() will return > "HEAD" or NULL if there's no symbolic reference, so anything else would > indicate a symref, but even in that case checking the flag explicitly is > definitely better to clearly show intent. Yes, that matches my understanding, too. -Peff