summaryrefslogtreecommitdiff
path: root/t/t4055-diff-context.sh
diff options
context:
space:
mode:
authorTanay Abhra <tanayabh@gmail.com>2014-08-07 11:59:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-07 18:41:10 (GMT)
commit155ef25f12329258c06b8875b5e372abec2d348d (patch)
tree8c91e6d847c778f998a29aae2890a3ad36f4edee /t/t4055-diff-context.sh
parent5a80e97c827e9d73884dbe4119bf97f6dd84b237 (diff)
downloadgit-155ef25f12329258c06b8875b5e372abec2d348d.zip
git-155ef25f12329258c06b8875b5e372abec2d348d.tar.gz
git-155ef25f12329258c06b8875b5e372abec2d348d.tar.bz2
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 <tanayabh@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4055-diff-context.sh')
-rwxr-xr-xt/t4055-diff-context.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t4055-diff-context.sh b/t/t4055-diff-context.sh
index cd04543..741e080 100755
--- a/t/t4055-diff-context.sh
+++ b/t/t4055-diff-context.sh
@@ -79,7 +79,7 @@ test_expect_success 'non-integer config parsing' '
test_expect_success 'negative integer config parsing' '
git config diff.context -1 &&
test_must_fail git diff 2>output &&
- test_i18ngrep "bad config file" output
+ test_i18ngrep "bad config variable" output
'
test_expect_success '-U0 is valid, so is diff.context=0' '