t3903: fix broken test_must_fail calls
[gitweb.git] / t / t5522-pull-symlink.sh
index 5672b51e2ea8db0e080e95315b292c91480a0000..298200fa4cafc61b5f16f9337314a2b887593a36 100755 (executable)
@@ -4,6 +4,12 @@ test_description='pulling from symlinked subdir'
 
 . ./test-lib.sh
 
+if ! test_have_prereq SYMLINKS
+then
+       skip_all='Symbolic links not supported, skipping tests.'
+       test_done
+fi
+
 # The scenario we are building:
 #
 #   trash\ directory/
@@ -14,13 +20,19 @@ test_description='pulling from symlinked subdir'
 #
 # The working directory is subdir-link.
 
-mkdir subdir
-echo file >subdir/file
-git add subdir/file
-git commit -q -m file
-git clone -q . clone-repo
-ln -s clone-repo/subdir/ subdir-link
-
+test_expect_success setup '
+       mkdir subdir &&
+       echo file >subdir/file &&
+       git add subdir/file &&
+       git commit -q -m file &&
+       git clone -q . clone-repo &&
+       ln -s clone-repo/subdir/ subdir-link &&
+       (
+               cd clone-repo &&
+               git config receive.denyCurrentBranch warn
+       ) &&
+       git config receive.denyCurrentBranch warn
+'
 
 # Demonstrate that things work if we just avoid the symlink
 #