git-tag: fix -l switch handling regression.
[gitweb.git] / t / t1501-worktree.sh
index 732216184ffc255a385aac81ba970edfc6a9e83a..7ee3820ce97b6c26c9465685a7bc64a962aad3cb 100755 (executable)
@@ -103,4 +103,13 @@ test_expect_success 'repo finds its work tree from work tree, too' '
         test sub/dir/tracked = "$(git ls-files)")
 '
 
+test_expect_success '_gently() groks relative GIT_DIR & GIT_WORK_TREE' '
+       cd repo.git/work/sub/dir &&
+       GIT_DIR=../../.. GIT_WORK_TREE=../.. GIT_PAGER= \
+               git diff --exit-code tracked &&
+       echo changed > tracked &&
+       ! GIT_DIR=../../.. GIT_WORK_TREE=../.. GIT_PAGER= \
+               git diff --exit-code tracked
+'
+
 test_done