Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / git / t / t1003-read-tree-prefix.sh
blobc59ce72d94feeab90f9642bd11e2ce4399124d70
1 #!/bin/sh
3 # Copyright (c) 2006 Junio C Hamano
6 test_description='git read-tree --prefix test.
9 . ./test-lib.sh
11 cmp () {
12 diff -w "$@"
15 test_expect_success setup '
16 echo hello >one &&
17 git update-index --add one &&
18 tree=`git write-tree` &&
19 echo tree is $tree
22 echo 'one
23 two/one' >expect
25 test_expect_success 'read-tree --prefix' '
26 git read-tree --prefix=two/ $tree &&
27 git ls-files >actual &&
28 cmp expect actual
31 test_done