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
10 TEST_PASSES_SANITIZE_LEAK
=true
13 test_expect_success setup
'
16 echo hello >frotz/filfre &&
17 git add frotz/filfre &&
19 git commit -m "main has file frotz/filfre" &&
23 echo goodbye >nitfol &&
26 git commit -m "main adds file nitfol" &&
30 git rm --cached frotz/filfre &&
32 test_ln_s_add xyzzy frotz &&
33 git add xyzzy/filfre &&
35 git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
39 test_expect_success
'switch from symlink to dir' '
45 test_expect_success
'Remove temporary directories & switch to main' '
46 rm -fr frotz xyzzy nitfol &&
50 test_expect_success
'switch from dir to symlink' '