From 8fe2c189e5549ef2c9d92b2eb8382802bc8c0bc0 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 11 Jan 2026 01:01:21 +0000 Subject: [PATCH] config: consistent error messages --- src/libgit2/config.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libgit2/config.c b/src/libgit2/config.c index 65772fcbe..653142ce4 100644 --- a/src/libgit2/config.c +++ b/src/libgit2/config.c @@ -1442,14 +1442,12 @@ int git_config_parse_bool(int *out, const char *value) if (git__parse_bool(out, value) == 0) return 0; - /* git__parse_bool returns 0 for NULL, so this assertion should be correct */ - GIT_ASSERT_ARG(value); if (git_config_parse_int32(out, value) == 0) { *out = !!(*out); return 0; } - git_error_set(GIT_ERROR_CONFIG, "failed to parse '%s' as a boolean value", value); + git_error_set(GIT_ERROR_CONFIG, "failed to parse '%s' as a boolean", value ? value : "(null)"); return -1; }