Merge git://ozlabs.org/~paulus/gitk
[gitweb.git] / t / t3060-ls-files-with-tree.sh
index 3ce501bb9794900b99fbbf2f2ccfbb330f7947a7..61c1f53d1b75302be60396d2e01ccd5da5b6e5b4 100755 (executable)
@@ -53,17 +53,15 @@ test_expect_success setup '
        git add .
 '
 
-# We have to run from a sub-directory to trigger prune_path
-# Then we finally get to run our --with-tree test
-cd sub
-
 test_expect_success 'git -ls-files --with-tree should succeed from subdir' '
-
-       git ls-files --with-tree=HEAD~1 >../output
-
+       # We have to run from a sub-directory to trigger prune_path
+       # Then we finally get to run our --with-tree test
+       (
+               cd sub &&
+               git ls-files --with-tree=HEAD~1 >../output
+       )
 '
 
-cd ..
 test_expect_success \
     'git -ls-files --with-tree should add entries from named tree.' \
     'test_cmp expected output'