Merge branch 'tq/git-ssh-command'
[gitweb.git] / t / t3060-ls-files-with-tree.sh
index 68eb266d73532b308754ef350ec2ff05a50b3c50..61c1f53d1b75302be60396d2e01ccd5da5b6e5b4 100755 (executable)
@@ -53,19 +53,17 @@ 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.' \
-    'diff -u expected output'
+    'test_cmp expected output'
 
 test_done