diff options
author | Steven Drake <sdrake@xnet.co.nz> | 2010-02-26 17:00:21 +1300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-25 22:47:48 -0800 |
commit | a94d305bf8043a7a0579037c7e52e632613410f7 (patch) | |
tree | fe5fb24e4e0685344f834cbaf3c7bbc2a008ccd1 /t/t0001-init.sh | |
parent | b02a17f2b7d0d3f5899ffdd9709ded8cea8ae019 (diff) | |
download | git-a94d305bf8043a7a0579037c7e52e632613410f7.tar.gz |
t/t0001-init.sh: add test for 'init with init.templatedir set'
Requires a small change to wrap-for-bin.sh in order to work.
Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0001-init.sh')
-rwxr-xr-x | t/t0001-init.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 5386504790..675773479a 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -167,6 +167,25 @@ test_expect_success 'init with --template (blank)' ' ! test -f template-blank/.git/info/exclude ' +test_expect_success 'init with init.templatedir set' ' + mkdir templatedir-source && + echo Content >templatedir-source/file && + ( + HOME="`pwd`" && + export HOME && + test_config="${HOME}/.gitconfig" && + git config -f "$test_config" init.templatedir "${HOME}/templatedir-source" && + mkdir templatedir-set && + cd templatedir-set && + unset GIT_CONFIG_NOGLOBAL && + unset GIT_TEMPLATE_DIR && + NO_SET_GIT_TEMPLATE_DIR=t && + export NO_SET_GIT_TEMPLATE_DIR && + git init + ) && + test_cmp templatedir-source/file templatedir-set/.git/file +' + test_expect_success 'init --bare/--shared overrides system/global config' ' ( HOME="`pwd`" && |