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/t2002-checkout-cache-u.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 / t2002-checkout-cache-u.sh` 33 lines ยท 741 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2005 Junio C Hamano 4 # 5 6 test_description='git checkout-index -u test. 7 8 With -u flag, git checkout-index internally runs the equivalent of 9 git update-index --refresh on the checked out entry.' 10 11 . ./test-lib.sh 12 13 test_expect_success \ 14 'preparation' ' 15 echo frotz >path0 && 16 git update-index --add path0 && 17 t=$(git write-tree)' 18 19 test_expect_success \ 20 'without -u, git checkout-index smudges stat information.' ' 21 rm -f path0 && 22 git read-tree $t && 23 git checkout-index -f -a && 24 test_must_fail git diff-files --exit-code' 25 26 test_expect_success \ 27 'with -u, git checkout-index picks up stat information from new files.' ' 28 rm -f path0 && 29 git read-tree $t && 30 git checkout-index -u -f -a && 31 git diff-files --exit-code' 32 33 test_done