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/t1014-read-tree-confusing.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 / t1014-read-tree-confusing.sh` 64 lines ยท 1441 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='check that read-tree rejects confusing paths' 4 5 . ./test-lib.sh 6 7 test_expect_success 'create base tree' ' 8 echo content >file && 9 git add file && 10 git commit -m base && 11 blob=$(git rev-parse HEAD:file) && 12 tree=$(git rev-parse HEAD^{tree}) 13 ' 14 15 test_expect_success 'enable core.protectHFS for rejection tests' ' 16 git config core.protectHFS true 17 ' 18 19 test_expect_success 'enable core.protectNTFS for rejection tests' ' 20 git config core.protectNTFS true 21 ' 22 23 while read path pretty; do 24 : ${pretty:=$path} 25 case "$path" in 26 *SPACE) 27 path="${path%SPACE} " 28 ;; 29 esac 30 test_expect_success "reject $pretty at end of path" ' 31 printf "100644 blob %s\t%s" "$blob" "$path" >tree && 32 bogus=$(git mktree tree && 38 bogus=$(git mktree tree && 60 ok=$(git mktree