X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1501-worktree.sh;h=27dc6c55d5f50a7fd30388b60230482bad6be2d8;hb=f39e4cfa2ec2bab4175cee3a9e806d8b65161c75;hp=f6a6f839a18de4c3775ea965f164d0d20f2bbe9b;hpb=90c3302173c5a02189f5fe9091c0d07f7b7ebe89;p=git.git diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh index f6a6f839a..27dc6c55d 100755 --- a/t/t1501-worktree.sh +++ b/t/t1501-worktree.sh @@ -92,6 +92,13 @@ cd sub/dir || exit 1 test_rev_parse 'in repo.git/sub/dir' false true true sub/dir/ cd ../../../.. || exit 1 +test_expect_success 'detecting gitdir when cwd is in a subdir of gitdir' ' + (expected=$(pwd)/repo.git && + cd repo.git/refs && + unset GIT_DIR && + test "$expected" = "$(git rev-parse --git-dir)") +' + test_expect_success 'repo finds its work tree' ' (cd repo.git && : > work/sub/dir/untracked &&