summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b02a17f)
raw | patch | inline | side by side (parent: b02a17f)
author | Steven Drake <sdrake@xnet.co.nz> | |
Fri, 26 Feb 2010 04:00:21 +0000 (17:00 +1300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 26 Feb 2010 06:47:48 +0000 (22:47 -0800) |
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>
Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0001-init.sh | patch | blob | history | |
wrap-for-bin.sh | patch | blob | history |
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index 5386504790deea55d127f053f7b714cd121a2d57..675773479a8c6a1791ae01eb47654f4433c30ee3 100755 (executable)
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
! 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`" &&
diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh
index c5075c9c61ca97923e233622061da8365641b6c4..aece782a85c2fdbc4c2dfe3dcb242ddf56581a22 100644 (file)
--- a/wrap-for-bin.sh
+++ b/wrap-for-bin.sh
# @@BUILD_DIR@@ and @@PROG@@.
GIT_EXEC_PATH='@@BUILD_DIR@@'
-GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
+test -z "$NO_SET_GIT_TEMPLATE_DIR" &&
+ GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
export GIT_EXEC_PATH GIT_TEMPLATE_DIR GITPERLLIB PATH