git-svn: Fix git svn log --show-commit
[gitweb.git] / t / t1501-worktree.sh
index dc7c99257ce15102a8f5c9986e17599aeb9d1ca0..63849836c8b088eb495dc565ff909c367c868301 100755 (executable)
@@ -339,4 +339,11 @@ test_expect_success 'make_relative_path handles double slashes in GIT_DIR' '
        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