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/t1003-read-tree-prefix.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 / t1003-read-tree-prefix.sh` 37 lines ยท 703 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2006 Junio C Hamano 4 # 5 6 test_description='git read-tree --prefix test. 7 ' 8 9 . ./test-lib.sh 10 11 test_expect_success setup ' 12 echo hello >one && 13 git update-index --add one && 14 tree=$(git write-tree) && 15 echo tree is $tree 16 ' 17 18 echo 'one 19 two/one' >expect 20 21 test_expect_success 'read-tree --prefix' ' 22 git read-tree --prefix=two/ $tree && 23 git ls-files >actual && 24 cmp expect actual 25 ' 26 27 test_expect_success 'read-tree --prefix with leading slash exits with error' ' 28 git rm -rf . && 29 test_must_fail git read-tree --prefix=/two/ $tree && 30 git read-tree --prefix=two/ $tree && 31 32 git rm -rf . && 33 test_must_fail git read-tree --prefix=/ $tree && 34 git read-tree --prefix= $tree 35 ' 36 37 test_done