config: use git_config_string() for core.checkRoundTripEncoding
commitbe6bc048d74779476610caa7bfb51ef0b71ba5a6
authorJeff King <peff@peff.net>
Thu, 7 Dec 2023 07:26:11 +0000 (7 02:26 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2023 23:26:22 +0000 (9 08:26 +0900)
treed1d30fa383cb7b4f2d6bf8fdb41f986023931c00
parent08248790787e4b6c3e687ca88f727bbdb52fc3a8
config: use git_config_string() for core.checkRoundTripEncoding

Since this code path was recently converted to check for a NULL value,
it now behaves exactly like git_config_string(). We can shorten the code
a bit by using that helper.

Note that git_config_string() takes a const pointer, but our storage
variable is non-const. We're better off making this "const", though,
since the default value points to a string literal (and thus it would be
an error if anybody tried to write to it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
convert.h
environment.c