3 # Copyright (c) 2007 Junio C Hamano
5 test_description
='git checkout to switch between branches with symlink<->dir'
9 if ! test_have_prereq SYMLINKS
11 say
"symbolic links not supported - skipping tests"
15 test_expect_success setup
'
18 echo hello >frotz/filfre &&
19 git add frotz/filfre &&
21 git commit -m "master has file frotz/filfre" &&
25 echo goodbye >nitfol &&
28 git commit -m "master adds file nitfol" &&
32 git rm --cached frotz/filfre &&
35 git add xyzzy/filfre frotz &&
37 git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
41 test_expect_success
'switch from symlink to dir' '
47 rm -fr frotz xyzzy nitfol
&&
48 git checkout
-f master ||
exit
50 test_expect_success
'switch from dir to symlink' '