]>
Commit | Line | Data |
---|---|---|
ec0603e1 JH |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2007 Junio C Hamano | |
4 | ||
5 | test_description='git checkout to switch between branches with symlink<->dir' | |
6 | ||
7 | . ./test-lib.sh | |
8 | ||
889c6f0e | 9 | test_expect_success setup ' |
ec0603e1 JH |
10 | |
11 | mkdir frotz && | |
12 | echo hello >frotz/filfre && | |
13 | git add frotz/filfre && | |
14 | test_tick && | |
15 | git commit -m "master has file frotz/filfre" && | |
16 | ||
17 | git branch side && | |
18 | ||
19 | echo goodbye >nitfol && | |
a48fcd83 | 20 | git add nitfol && |
ec0603e1 JH |
21 | test_tick && |
22 | git commit -m "master adds file nitfol" && | |
23 | ||
24 | git checkout side && | |
25 | ||
26 | git rm --cached frotz/filfre && | |
27 | mv frotz xyzzy && | |
889c6f0e JS |
28 | test_ln_s_add xyzzy frotz && |
29 | git add xyzzy/filfre && | |
ec0603e1 JH |
30 | test_tick && |
31 | git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/" | |
32 | ||
33 | ' | |
34 | ||
889c6f0e | 35 | test_expect_success 'switch from symlink to dir' ' |
ec0603e1 JH |
36 | |
37 | git checkout master | |
38 | ||
39 | ' | |
40 | ||
889c6f0e | 41 | test_expect_success 'Remove temporary directories & switch to master' ' |
621fd7a2 ÆAB |
42 | rm -fr frotz xyzzy nitfol && |
43 | git checkout -f master | |
44 | ' | |
ec0603e1 | 45 | |
889c6f0e | 46 | test_expect_success 'switch from dir to symlink' ' |
ec0603e1 JH |
47 | |
48 | git checkout side | |
49 | ||
50 | ' | |
51 | ||
52 | test_done |