Re: [PATCH 1/4] refs: move ref name helpers around
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 3, 2024, 01:23 UTC
- Message-ID
- <xmqqbjxth84y.fsf@gitster.g>
- In-Reply-To
- <20241202203743.GB776185@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Mon, Dec 02, 2024 at 04:07:11PM +0900, Junio C Hamano wrote:
>
>> strbuf_branchname(), strbuf_check_{branch,tag}_ref() are helper
>> functions to deal with branch and tag names, and the fact that they
>> happen to use strbuf to hold the name of a branch or a tag is not
>> essential. These functions fit better in the refs API than strbuf
>> API, the latter of which is about string manipulations.
>
> Wow, they are declared in strbuf.h but not even implemented there. So it
> was doubly confusing. This looks like a nice cleanup.Yup. Another home that may want to adopt them is the object-name API, but I think refs API is good enough, and certainly better than strbuf.