3 # Copyright (c) 2007 Junio C Hamano
5 test_description
='git checkout to switch between branches with symlink<->dir'
7 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
=main
8 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
12 test_expect_success setup
'
15 echo hello >frotz/filfre &&
16 git add frotz/filfre &&
18 git commit -m "main has file frotz/filfre" &&
22 echo goodbye >nitfol &&
25 git commit -m "main adds file nitfol" &&
29 git rm --cached frotz/filfre &&
31 test_ln_s_add xyzzy frotz &&
32 git add xyzzy/filfre &&
34 git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
38 test_expect_success
'switch from symlink to dir' '
44 test_expect_success
'Remove temporary directories & switch to main' '
45 rm -fr frotz xyzzy nitfol &&
49 test_expect_success
'switch from dir to symlink' '