Subject: Re: [PATCH 3/3] shorten_unambiguous_ref(): avoid sscanf()

From: Junio C Hamano <[email-masked]>
Date: Tue, 14 Feb 2023 14:25:19 -0800

Junio C Hamano <[email-masked]> writes:

> Am I reading the loop correctly?  I wanted the bogus refname not to
> match the rule, but without peeking back refname[-1], I cannot tell
> the two cases apart at this point.

Heh.

    $ git symbolic-ref BOGO refsXheads/naster
    $ git symbolic-ref --short BOGO
    heads/naster