Merge branch 'np/compress-loose-object-memsave' into maint
[tgit.git] / t / t2009-checkout-statinfo.sh
blobf3c21520877e271506be13b5cabad5e7906f0c91
1 #!/bin/sh
3 test_description='checkout should leave clean stat info'
5 . ./test-lib.sh
7 test_expect_success 'setup' '
9 echo hello >world &&
10 git update-index --add world &&
11 git commit -m initial &&
12 git branch side &&
13 echo goodbye >world &&
14 git update-index --add world &&
15 git commit -m second
19 test_expect_success 'branch switching' '
21 git reset --hard &&
22 test "$(git diff-files --raw)" = "" &&
24 git checkout master &&
25 test "$(git diff-files --raw)" = "" &&
27 git checkout side &&
28 test "$(git diff-files --raw)" = "" &&
30 git checkout master &&
31 test "$(git diff-files --raw)" = ""
35 test_expect_success 'path checkout' '
37 git reset --hard &&
38 test "$(git diff-files --raw)" = "" &&
40 git checkout master world &&
41 test "$(git diff-files --raw)" = "" &&
43 git checkout side world &&
44 test "$(git diff-files --raw)" = "" &&
46 git checkout master world &&
47 test "$(git diff-files --raw)" = ""
51 test_done