Re: [PATCH v2 0/3] get rid of sscanf() when shortening refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 15, 2023, 18:00 UTC
- Message-ID
- <xmqqa61ezu42.fsf@gitster.g>
- In-Reply-To
- <Y+z3MtgayoXsxaHA@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> + - scanf's matching of "%s" is greedy. So the "refs/remotes/%s/HEAD" > + rule would never pull "origin" out of "refs/remotes/origin/HEAD". > + Instead it always produced "origin/HEAD", which is redundant with > + the "refs/remotes/%s" rule.
Wow, that thing is new. Fixing it may break expectations by existing script by end-users, but it may probably be OK.
Everything looks good.