Skip to content

Commit a0883a2

Browse files
jiangxingitster
authored andcommitted
t1301: fix wrong template dir for git-init
The template dir prepared in test case "forced modes" is not used as expected because a wrong template dir is provided to "git init". This is because the $CWD for "git-init" command is a sibling directory alongside the template directory. Change it to the right template directory and add a protection test using "test_path_is_file". The wrong template directory was introduced by mistake in commit e1df7fe (init: make --template path relative to $CWD, 2019-05-10). Signed-off-by: Jiang Xin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e7e5c6f commit a0883a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t1301-shared-repo.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ test_expect_success POSIXPERM 'forced modes' '
140140
(
141141
cd new &&
142142
umask 002 &&
143-
git init --shared=0660 --template=templates &&
143+
git init --shared=0660 --template=../templates &&
144+
test_path_is_file .git/hooks/post-update &&
144145
>frotz &&
145146
git add frotz &&
146147
git commit -a -m initial &&

0 commit comments

Comments
 (0)