Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc authored by Junio C Hamano on 15 November 2021, 06:50:52 UTC
Git 2.34
Tip revision: cd3e606
t1003-read-tree-prefix.sh
#!/bin/sh
#
# Copyright (c) 2006 Junio C Hamano
#

test_description='git read-tree --prefix test.
'

TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh

test_expect_success setup '
	echo hello >one &&
	git update-index --add one &&
	tree=$(git write-tree) &&
	echo tree is $tree
'

echo 'one
two/one' >expect

test_expect_success 'read-tree --prefix' '
	git read-tree --prefix=two/ $tree &&
	git ls-files >actual &&
	cmp expect actual
'

test_done
back to top