diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-23 13:30:14 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-23 13:30:14 -0800 |
commit | fd1727f5fa1ca1817eee36f99c9245dc2217ecac (patch) | |
tree | 20f7bbc16c723bf42a6736f6719b22d5db06b30f /t/t1300-repo-config.sh | |
parent | Merge branch 'jc/add-refresh-unmerged' (diff) | |
parent | config: add include directive (diff) | |
download | tgif-fd1727f5fa1ca1817eee36f99c9245dc2217ecac.tar.xz |
Merge branch 'jk/config-include'
* jk/config-include:
: An assignment to the include.path pseudo-variable causes the named file
: to be included in-place when Git looks up configuration variables.
config: add include directive
config: eliminate config_exclusive_filename
config: stop using config_exclusive_filename
config: provide a version of git_config with more options
config: teach git_config_rename_section a file argument
config: teach git_config_set_multivar_in_file a default path
config: copy the return value of prefix_filename
t1300: add missing &&-chaining
docs/api-config: minor clarifications
docs: add a basic description of the config API
Diffstat (limited to 't/t1300-repo-config.sh')
-rwxr-xr-x | t/t1300-repo-config.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 0690e0edf4..5f249f681e 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -451,13 +451,21 @@ test_expect_success 'refer config from subdirectory' ' mkdir x && ( cd x && - echo strasse >expect + echo strasse >expect && git config --get --file ../other-config ein.bahn >actual && test_cmp expect actual ) ' +test_expect_success 'refer config from subdirectory via GIT_CONFIG' ' + ( + cd x && + GIT_CONFIG=../other-config git config --get ein.bahn >actual && + test_cmp expect actual + ) +' + cat > expect << EOF [ein] bahn = strasse @@ -960,4 +968,21 @@ test_expect_success 'git -c complains about empty key and value' ' test_must_fail git -c "" rev-parse ' +test_expect_success 'git config --edit works' ' + git config -f tmp test.value no && + echo test.value=yes >expect && + GIT_EDITOR="echo [test]value=yes >" git config -f tmp --edit && + git config -f tmp --list >actual && + test_cmp expect actual +' + +test_expect_success 'git config --edit respects core.editor' ' + git config -f tmp test.value no && + echo test.value=yes >expect && + test_config core.editor "echo [test]value=yes >" && + git config -f tmp --edit && + git config -f tmp --list >actual && + test_cmp expect actual +' + test_done |