Re: [PATCH v3 3/5] strbuf: bring back is_rfc3986_unreserved
- From
Adrian Ratiu <adrian.ratiu@collabora.com>
- Date
- Oct 7, 2025, 09:43 UTC
- Message-ID
- <87ms633v3g.fsf@collabora.com>
- In-Reply-To
- <xmqq8qhoq8hg.fsf@gitster.g>
On Mon, 06 Oct 2025, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Adrian Ratiu <adrian.ratiu@collabora.com> writes: > >> is_rfc3986_unreserved() was moved to credential-store.c and was >> made static by f89854362c (credential-store: move related >> functions to credential-store file, 2023-06-06) under a correct >> assumption, at the time, that it was the only place using it. >> >> However now we need it to apply URL-encoding to submodule names >> when constructing gitdir paths, to avoid conflicts, so bring it >> back. > > Why to strbuf, though? > > This does not have anything to do with what strbuf does. I > could be possible that strbuf.c had some function that > encodes/decodes 3986 in a strbuf and this may have been a useful > helper for that feature, but it is apparent that this helper > function is needed by strbuf.[ch] in today's code, so moving it > to strbuf.[ch] makes no sense to me.
Agreed. The only reason I moved it back to strbuf is because it was there in the past, however we can move it to anywhere else.
Perhaps url.[ch] is the best place. Would that be ok?
Other location suggestions are welcome btw. :)