Skip to content

urlmatch: allow wildcard-based matches

Patrick Steinhardt git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest5 patches 0 repliesNew

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mailmap: add Patrick Steinhardt's work address.mailmap+1 -00 replies
2/5urlmatch: enable normalization of URLs with globsurlmatch.c+12 -20 replies
3/5urlmatch: split host and port fields in `struct url_info`urlmatch.c urlmatch.h+17 -80 replies
4/5urlmatch: include host in urlmatch rankingt/t1300-repo-config.sh urlmatch.c urlmatch.h+69 -260 replies
5/5urlmatch: allow globbing for the URL host partDocumentation/config.txt t/t1300-repo-config.sh urlmatch.c+121 -50 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchJunio C Hamano
1/5
2/5
3/5
4/5
5/5Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/5] urlmatch: allow wildcard-based matches

Hi,

this is version 5 of my patch series. The previous version can be found at [1]. The use case is to be able to configure an HTTP proxy for all subdomains of a domain where there are hundreds of subdomains.

This includes only a single change, interdiff is included below. The previous version had an embarassing bug because a variable was not properly initialized in all cases, leading to undefined behavior. I also verified that the patches work on top of 4e59582ff (Seventh batch for 2.12, 2017-01-23), where Junio reported the test failures.

Regards
Patrick

Patrick Steinhardt (5):
mailmap: add Patrick Steinhardt's work address
urlmatch: enable normalization of URLs with globs
urlmatch: split host and port fields in struct url_info
urlmatch: include host in urlmatch ranking
urlmatch: allow globbing for the URL host part

 .mailmap                 |   1 +
 Documentation/config.txt |   5 +-
 t/t1300-repo-config.sh   | 105 ++++++++++++++++++++++++++++++++++++
 urlmatch.c               | 138 +++++++++++++++++++++++++++++++++++------------
 urlmatch.h               |  12 +++--
 5 files changed, 220 insertions(+), 41 deletions(-)
Signature · 1 line
2.11.0
urlmatch.c +1 -1
index bb5267732..6c12f1a48 100644
@@ -552,7 +552,7 @@ int urlmatch_config_entry(const char *var, const char *value, void *cb)
 {
 	struct string_list_item *item;
 	struct urlmatch_config *collect = cb;
-	struct urlmatch_item matched;
+	struct urlmatch_item matched = {0};
 	struct url_info *url = &collect->url;
 	const char *key, *dot;
 	struct strbuf synthkey = STRBUF_INIT;