diff --git a/t/t1501-worktree.sh b/t/t1501-worktree.sh
index 2c8f01f6684cbe492132575209f79371ad761d87..da6252b1179c47d39393c983d88c75d84a507cb7 100755 (executable)
--- a/t/t1501-worktree.sh
+++ b/t/t1501-worktree.sh
git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file
'
+test_expect_success 'relative $GIT_WORK_TREE and git subprocesses' '
+ GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
+ test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
+ echo "$(pwd)/repo.git/work" >expected &&
+ test_cmp expected actual
+'
+
test_done