https://github.com/git/git
Raw File
Tip revision: e4f4299859610638e45ec1a36266973b9a4eb47a authored by Johannes Schindelin on 12 February 2021, 14:50:10 UTC
Git 2.28.1
Tip revision: e4f4299
t1003-read-tree-prefix.sh
#!/bin/sh
#
# Copyright (c) 2006 Junio C Hamano
#

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

. ./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