Re: [PATCH 3/3] shorten_unambiguous_ref(): avoid sscanf()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 14, 2023, 22:25 UTC
- Message-ID
- <xmqq5yc351gw.fsf@gitster.g>
- In-Reply-To
- <xmqqmt5f535i.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 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