mktree: do not check type of remote objects
[git/debian.git] / t / t2009-checkout-statinfo.sh
blob71195dd28f2258d3286cc478967b0319ae58b143
1 #!/bin/sh
3 test_description='checkout should leave clean stat info'
5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
8 TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
11 test_expect_success 'setup' '
13 echo hello >world &&
14 git update-index --add world &&
15 git commit -m initial &&
16 git branch side &&
17 echo goodbye >world &&
18 git update-index --add world &&
19 git commit -m second
23 test_expect_success 'branch switching' '
25 git reset --hard &&
26 test "$(git diff-files --raw)" = "" &&
28 git checkout main &&
29 test "$(git diff-files --raw)" = "" &&
31 git checkout side &&
32 test "$(git diff-files --raw)" = "" &&
34 git checkout main &&
35 test "$(git diff-files --raw)" = ""
39 test_expect_success 'path checkout' '
41 git reset --hard &&
42 test "$(git diff-files --raw)" = "" &&
44 git checkout main world &&
45 test "$(git diff-files --raw)" = "" &&
47 git checkout side world &&
48 test "$(git diff-files --raw)" = "" &&
50 git checkout main world &&
51 test "$(git diff-files --raw)" = ""
55 test_done