1#!/bin/sh 2# 3# Copyright (c) 2006 Junio C Hamano 4# 5 6test_description='git read-tree --prefix test. 7' 8 9TEST_PASSES_SANITIZE_LEAK=true 10. ./test-lib.sh 11 12test_expect_success setup ' 13 echo hello >one && 14 git update-index --add one && 15 tree=$(git write-tree) && 16 echo tree is $tree 17' 18 19echo 'one 20two/one' >expect 21 22test_expect_success 'read-tree --prefix' ' 23 git read-tree --prefix=two/ $tree && 24 git ls-files >actual && 25 cmp expect actual 26' 27 28test_done 29