| # Copyright (c) 2007 Junio C Hamano |
| test_description='git checkout to switch between branches with symlink<->dir' |
| if ! test_have_prereq SYMLINKS |
| say "symbolic links not supported - skipping tests" |
| test_expect_success setup ' |
| echo hello >frotz/filfre && |
| git commit -m "master has file frotz/filfre" && |
| git commit -m "master adds file nitfol" && |
| git rm --cached frotz/filfre && |
| git add xyzzy/filfre frotz && |
| git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/" |
| test_expect_success 'switch from symlink to dir' ' |
| rm -fr frotz xyzzy nitfol && |
| git checkout -f master || exit |
| test_expect_success 'switch from dir to symlink' ' |