Skip a test related to symbolic links.
[git/mingw/4msysgit/wingit-dll.git] / t / t2007-checkout-symlink.sh
blob0bf1ddb94b44354f139a8bac3e91f7f25b3f3c5e
1 #!/bin/sh
3 # Copyright (c) 2007 Junio C Hamano
5 test_description='git checkout to switch between branches with symlink<->dir'
7 . ./test-lib.sh
9 if test "$no_symlinks"
10 then
11 say 'Symbolic links not supported, skipping tests.'
12 test_done
13 exit
16 test_expect_success setup '
18 mkdir frotz &&
19 echo hello >frotz/filfre &&
20 git add frotz/filfre &&
21 test_tick &&
22 git commit -m "master has file frotz/filfre" &&
24 git branch side &&
26 echo goodbye >nitfol &&
27 git add nitfol
28 test_tick &&
29 git commit -m "master adds file nitfol" &&
31 git checkout side &&
33 git rm --cached frotz/filfre &&
34 mv frotz xyzzy &&
35 ln -s xyzzy frotz &&
36 git add xyzzy/filfre frotz &&
37 test_tick &&
38 git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
42 test_expect_success 'switch from symlink to dir' '
44 git checkout master
48 rm -fr frotz xyzzy nitfol &&
49 git checkout -f master || exit
51 test_expect_success 'switch from dir to symlink' '
53 git checkout side
57 test_done