diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-10 15:32:43 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-10 15:32:43 -0800 |
commit | 90a2bf9ca155c8e0e43d9e30197d9562dd02ea96 (patch) | |
tree | 5c6b98713a4724ef44054b5fe513d260157e3bd4 /t | |
parent | c505a850157961d2db4512d029753946d0591649 (diff) | |
parent | 160ad147fe9f644fc35224095e1d1a01be0208de (diff) | |
download | git-90a2bf9ca155c8e0e43d9e30197d9562dd02ea96.tar.gz |
Merge branch 'sd/init-template'
* sd/init-template:
wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR
t/t0001-init.sh: add test for 'init with init.templatedir set'
init: having keywords without value is not a global error.
Add a "TEMPLATE DIRECTORY" section to git-init[1].
Add `init.templatedir` configuration variable.
Diffstat (limited to 't')
-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`" && |