tvl-depot/third_party/git/t/t1003-read-tree-prefix.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

27 lines
413 B
Bash
Executable file

#!/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