]> git.ipfire.org Git - thirdparty/git.git/commit
urlmatch: add url_normalize_pattern() helper
authorChristian Couder <christian.couder@gmail.com>
Wed, 27 May 2026 14:08:15 +0000 (16:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 May 2026 20:20:15 +0000 (05:20 +0900)
commit58880c82feb460015153575dc02b9959e4d8a8a0
treee598976e7ffe38b7eddc7a3276b9b17eac22b4af
parentee7ea4907ccef604f764df5e223640ad04192f6d
urlmatch: add url_normalize_pattern() helper

In a following commit, we will need to normalize a URL glob pattern
(which may contain '*' in the host portion) and extract its component
offsets (host, path, etc.) for separate matching. Let's export a
dedicated helper function url_normalize_pattern() for that purpose.

It works like url_normalize(), but passes allow_globs=true to the
internal url_normalize_1(), so that '*' characters in the host are
accepted rather than rejected.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
urlmatch.c
urlmatch.h