Re: [PATCH 4/6] config: drop git_config_get_string_const()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 14, 2020, 20:21 UTC
- Message-ID
- <xmqq364pvv03.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200814161921.GD595698@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> As evidenced by the leak fixes in the previous commit, the "const" in > git_config_get_string_const() clearly misleads people into thinking that > it does not allocate a copy of the string. We can fix this by renaming > it, but it's easier still to just drop it.
This turns out to be a bit more painful than I imagined.
Do we want to do the same with repo_config_get_string_const(), by the way? Which would open the wound even wider, but may be worth doing for consistency.