urlmatch: change 'allow_globs' arg to bool

The last argument of url_normalize_1() is `char allow_globs` but it is used as a boolean, not as a char. Let's convert it to a `bool`, and while at it convert the two calls to url_normalize_1() so they pass 'true' or 'false' instead of '1' or '0'. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed May 27, 2026 at 16:08 UTC ee7ea4907ccef604f764df5e223640ad04192f6d
1 file changed +3 -3
urlmatch.c
+3 -3
@@ -112,7 +112,7 @@ static int match_host(const struct url_info *url_info,
112 return (!url_len && !pat_len);
113 }
114
115 -static char *url_normalize_1(const char *url, struct url_info *out_info, char allow_globs)
115 +static char *url_normalize_1(const char *url, struct url_info *out_info, bool allow_globs)
116 {
117 /*
118 * Normalize NUL-terminated url using the following rules:
@@ -438,7 +438,7 @@ static char *url_normalize_1(const char *url, struct url_info *out_info, char al
438
439 char *url_normalize(const char *url, struct url_info *out_info)
440 {
441 - return url_normalize_1(url, out_info, 0);
441 + return url_normalize_1(url, out_info, false);
442 }
443
444 char *url_parse(const char *url_orig, struct url_info *out_info)
@@ -704,7 +704,7 @@ int urlmatch_config_entry(const char *var, const char *value,
704 struct url_info norm_info;
705
706 config_url = xmemdupz(key, dot - key);
707 - norm_url = url_normalize_1(config_url, &norm_info, 1);
707 + norm_url = url_normalize_1(config_url, &norm_info, true);
708 if (norm_url)
709 retval = match_urls(url, &norm_info, &matched);
710 else if (collect->fallback_match_fn)