Merge branch 'cs/http-use-basic-after-failed-negotiate'
[alt-git.git] / t / t2009-checkout-statinfo.sh
blobb0540636ae387104edae67cd7baa74949f7f5ffd
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-lib.sh
10 test_expect_success 'setup' '
12 echo hello >world &&
13 git update-index --add world &&
14 git commit -m initial &&
15 git branch side &&
16 echo goodbye >world &&
17 git update-index --add world &&
18 git commit -m second
22 test_expect_success 'branch switching' '
24 git reset --hard &&
25 test "$(git diff-files --raw)" = "" &&
27 git checkout main &&
28 test "$(git diff-files --raw)" = "" &&
30 git checkout side &&
31 test "$(git diff-files --raw)" = "" &&
33 git checkout main &&
34 test "$(git diff-files --raw)" = ""
38 test_expect_success 'path checkout' '
40 git reset --hard &&
41 test "$(git diff-files --raw)" = "" &&
43 git checkout main world &&
44 test "$(git diff-files --raw)" = "" &&
46 git checkout side world &&
47 test "$(git diff-files --raw)" = "" &&
49 git checkout main world &&
50 test "$(git diff-files --raw)" = ""
54 test_done