diff options
author | Jeff King <peff@peff.net> | 2023-12-07 10:26:11 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-09 02:26:22 +0300 |
commit | be6bc048d74779476610caa7bfb51ef0b71ba5a6 (patch) | |
tree | d1d30fa383cb7b4f2d6bf8fdb41f986023931c00 /convert.h | |
parent | 08248790787e4b6c3e687ca88f727bbdb52fc3a8 (diff) |
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>
Diffstat (limited to 'convert.h')
-rw-r--r-- | convert.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -92,7 +92,7 @@ void convert_attrs(struct index_state *istate, struct conv_attrs *ca, const char *path); extern enum eol core_eol; -extern char *check_roundtrip_encoding; +extern const char *check_roundtrip_encoding; const char *get_cached_convert_stats_ascii(struct index_state *istate, const char *path); const char *get_wt_convert_stats_ascii(const char *path); |