Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t2009-checkout-statinfo.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t2009-checkout-statinfo.sh` 55 lines ยท 1000 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='checkout should leave clean stat info' 4 5 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 6 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 7 8 . ./test-lib.sh 9 10 test_expect_success 'setup' ' 11 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 19 20 ' 21 22 test_expect_success 'branch switching' ' 23 24 git reset --hard && 25 test "$(git diff-files --raw)" = "" && 26 27 git checkout main && 28 test "$(git diff-files --raw)" = "" && 29 30 git checkout side && 31 test "$(git diff-files --raw)" = "" && 32 33 git checkout main && 34 test "$(git diff-files --raw)" = "" 35 36 ' 37 38 test_expect_success 'path checkout' ' 39 40 git reset --hard && 41 test "$(git diff-files --raw)" = "" && 42 43 git checkout main world && 44 test "$(git diff-files --raw)" = "" && 45 46 git checkout side world && 47 test "$(git diff-files --raw)" = "" && 48 49 git checkout main world && 50 test "$(git diff-files --raw)" = "" 51 52 ' 53 54 test_done 55