t1003-read-tree-prefix.sh 413 Bytes
Newer Older
1 2 3 4 5
#!/bin/sh
#
# Copyright (c) 2006 Junio C Hamano
#

6
test_description='git read-tree --prefix test.
7 8 9 10 11 12
'

. ./test-lib.sh

test_expect_success setup '
	echo hello >one &&
13
	git update-index --add one &&
14
	tree=$(git write-tree) &&
15 16 17 18 19 20 21
	echo tree is $tree
'

echo 'one
two/one' >expect

test_expect_success 'read-tree --prefix' '
22 23
	git read-tree --prefix=two/ $tree &&
	git ls-files >actual &&
24 25 26 27
	cmp expect actual
'

test_done