aboutsummaryrefslogtreecommitdiff
path: root/t/t0070-fundamental.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-31 10:42:01 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-31 14:58:42 -0700
commit836b6fb5a56338dc28165284875b257ccfd6c224 (patch)
treeaca2f31d1d6c4b60d792f3e1ac85fdd43d3e313f /t/t0070-fundamental.sh
parent3402a8dc485db5ad1df1557ab672b7e25048bc08 (diff)
downloadgit-836b6fb5a56338dc28165284875b257ccfd6c224.tar.gz
git-836b6fb5a56338dc28165284875b257ccfd6c224.tar.xz
config: add generic callback wrapper to parse section.<url>.key
Existing configuration parsing functions (e.g. http_options() in http.c) know how to parse two-level configuration variable names. We would like to exploit them and parse something like this: [http] sslVerify = true [http "https://weak.example.com"] sslVerify = false and pretend as if http.sslVerify were set to false when talking to "https://weak.example.com/path". Introduce `urlmatch_config_entry()` wrapper that: - is called with the target URL (e.g. "https://weak.example.com/path"), and the two-level variable parser (e.g. `http_options`); - uses `url_normalize()` and `match_urls()` to see if configuration data matches the target URL; and - calls the traditional two-level configuration variable parser only for the configuration data whose <url> part matches the target URL (and if there are multiple matches, only do so if the current match is a better match than the ones previously seen). Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0070-fundamental.sh')
0 files changed, 0 insertions, 0 deletions