From: Tanay Abhra Date: Thu, 7 Aug 2014 11:59:17 +0000 (-0700) Subject: rewrite git_config() to use the config-set API X-Git-Tag: v2.2.0-rc0~148^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/155ef25f12329258c06b8875b5e372abec2d348d?ds=inline;hp=155ef25f12329258c06b8875b5e372abec2d348d rewrite git_config() to use the config-set API Of all the functions in `git_config*()` family, `git_config()` has the most invocations in the whole code base. Each `git_config()` invocation causes config file rereads which can be avoided using the config-set API. Use the config-set API to rewrite `git_config()` to use the config caching layer to avoid config file rereads on each invocation during a git process lifetime. First invocation constructs the cache, and after that for each successive invocation, `git_config()` feeds values from the config cache instead of rereading the configuration files. Signed-off-by: Tanay Abhra Reviewed-by: Matthieu Moy Signed-off-by: Junio C Hamano ---