push: add a config option push.gpgSign for default signed pushes
[gitweb.git] / t / t3060-ls-files-with-tree.sh
index 3ce501bb9794900b99fbbf2f2ccfbb330f7947a7..44f378ce41d2f6a151b04759e930ef8f09242343 100755 (executable)
@@ -18,22 +18,16 @@ test_expect_success setup '
 
        echo file >expected &&
        mkdir sub &&
-       bad= &&
        for n in 0 1 2 3 4 5
        do
                for m in 0 1 2 3 4 5 6 7 8 9
                do
                        num=00$n$m &&
                        >sub/file-$num &&
-                       echo file-$num >>expected || {
-                               bad=t
-                               break
-                       }
-               done && test -z "$bad" || {
-                       bad=t
-                       break
-               }
-       done && test -z "$bad" &&
+                       echo file-$num >>expected ||
+                       return 1
+               done
+       done &&
        git add . &&
        git commit -m "add a bunch of files" &&
 
@@ -53,17 +47,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'