diff options
| author | Jiang Xin <zhiyou.jx@alibaba-inc.com> | 2022-11-29 21:15:09 +0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-11-30 10:21:50 +0900 |
| commit | a0883a2440903bcfcb6b0f0c9d0439168258e819 (patch) | |
| tree | eb3b7e902930d8f850c988e98ac073c3866d84b5 | |
| parent | e7e5c6f715b2de7bea0d39c7d2ba887335b40aa0 (diff) | |
| download | git-a0883a2440903bcfcb6b0f0c9d0439168258e819.tar.xz | |
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
e1df7fe43f (init: make --template path relative to $CWD, 2019-05-10).
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | t/t1301-shared-repo.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 93a2f91f8a..7578e75d77 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -140,7 +140,8 @@ test_expect_success POSIXPERM 'forced modes' ' ( cd new && umask 002 && - git init --shared=0660 --template=templates && + git init --shared=0660 --template=../templates && + test_path_is_file .git/hooks/post-update && >frotz && git add frotz && git commit -a -m initial && |
