2008/6/25 Alex Riesen <raa.lkml@xxxxxxxxx>: > Ifejinelo Onyiah, Wed, Jun 25, 2008 15:20:39 +0200: >> >> They all run fine but when I issue the make test command, it dies at >> the following: >> >> % make test >> >> ... TRUNCATED OUTPUT ... >> >> *** t2004-checkout-cache-temp.sh *** >> * FAIL 1: preparation >> > > If you don't mind helping the investigation a bit, could you please go > into the t/ directory and run > > bash -x t2004-checkout-cache-temp.sh -d -v -i > > and post the output here? I ran that command and it seemed to run with no problems. I have provided the output in 2 attached text files. I hope that is ok. > This diagnostics are much more useful (well, essential, in this case). Are running the tests on HFS+, BTW? > I am not sure of that. This is my first time I've heard of HFS+.
+ test_description=git checkout-index --temp test. With --temp flag, git checkout-index writes to temporary merge files rather than the tracked path. + . ./test-lib.sh ++ ORIGINAL_TERM=xterm-color ++ LANG=C ++ LC_ALL=C ++ PAGER=cat ++ TZ=UTC ++ TERM=dumb ++ export LANG LC_ALL PAGER TERM TZ ++ EDITOR=: ++ VISUAL=: ++ unset GIT_EDITOR ++ unset AUTHOR_DATE ++ unset AUTHOR_EMAIL ++ unset AUTHOR_NAME ++ unset COMMIT_AUTHOR_EMAIL ++ unset COMMIT_AUTHOR_NAME ++ unset EMAIL ++ unset GIT_ALTERNATE_OBJECT_DIRECTORIES ++ unset GIT_AUTHOR_DATE ++ GIT_AUTHOR_EMAIL=author@xxxxxxxxxxx ++ GIT_AUTHOR_NAME=A U Thor ++ unset GIT_COMMITTER_DATE ++ GIT_COMMITTER_EMAIL=committer@xxxxxxxxxxx ++ GIT_COMMITTER_NAME=C O Mitter ++ unset GIT_DIFF_OPTS ++ unset GIT_DIR ++ unset GIT_WORK_TREE ++ unset GIT_EXTERNAL_DIFF ++ unset GIT_INDEX_FILE ++ unset GIT_OBJECT_DIRECTORY ++ unset SHA1_FILE_DIRECTORIES ++ unset SHA1_FILE_DIRECTORY ++ GIT_MERGE_VERBOSITY=5 ++ export GIT_MERGE_VERBOSITY ++ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME ++ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME ++ export EDITOR VISUAL ++ GIT_TEST_CMP=diff -u ++ unset CDPATH +++ echo +++ tr '[A-Z]' '[a-z]' ++ '[' xxterm-color '!=' xdumb ']' ++ TERM=xterm-color ++ export TERM ++ '[' -t 1 ']' ++ test 3 -ne 0 ++ debug=t ++ shift ++ test 2 -ne 0 ++ verbose=t ++ shift ++ test 1 -ne 0 ++ immediate=t ++ shift ++ test 0 -ne 0 ++ test -n '' ++ test 'git checkout-index --temp test. With --temp flag, git checkout-index writes to temporary merge files rather than the tracked path.' '!=' '' ++ test '' = t ++ exec ++ test t = t ++ exec ++ test_failure=0 ++ test_count=0 ++ test_fixed=0 ++ test_broken=0 ++ trap die exit +++ pwd ++ PATH=/Users/io1/Desktop/git-1.5.6/t/..:/usr/local/bin:/usr/local/mysql/bin:/Users/io1/Applications/Ruby/bin:/Users/io1/Applications/Perl/bin:/bin:/sbin:/usr/bin:/usr/sbin +++ pwd ++ GIT_EXEC_PATH=/Users/io1/Desktop/git-1.5.6/t/.. +++ pwd ++ GIT_TEMPLATE_DIR=/Users/io1/Desktop/git-1.5.6/t/../templates/blt ++ unset GIT_CONFIG ++ unset GIT_CONFIG_LOCAL ++ GIT_CONFIG_NOSYSTEM=1 ++ GIT_CONFIG_NOGLOBAL=1 ++ export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL +++ pwd +++ pwd ++ GITPERLLIB=/Users/io1/Desktop/git-1.5.6/t/../perl/blib/lib:/Users/io1/Desktop/git-1.5.6/t/../perl/blib/arch/auto/Git ++ export GITPERLLIB ++ test -d ../templates/blt ++ test -x ../test-chmtime ++ . ../GIT-BUILD-OPTIONS +++ SHELL_PATH=/bin/sh ++ test=trash directory ++ rm -fr 'trash directory' ++ test_create_repo 'trash directory' ++ test 1 = 1 +++ pwd ++ owd=/Users/io1/Desktop/git-1.5.6/t ++ repo=trash directory ++ mkdir 'trash directory' ++ cd 'trash directory' ++ /Users/io1/Desktop/git-1.5.6/t/../git init --template=/Users/io1/Desktop/git-1.5.6/t/../templates/blt/ ++ mv .git/hooks .git/hooks-disabled ++ cd /Users/io1/Desktop/git-1.5.6/t ++ cd -P 'trash directory' +++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' ++ this_test=t2004 + test_expect_success preparation ' mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' + test 2 = 2 + test_skip preparation ' mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 0 + 1 + this_test=t2004.1 + to_skip= + false + say 'expecting success: mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' + say_color info 'expecting success: mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' + test -z info + shift + echo '* expecting success: mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' + test_run_ ' mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' + eval ' mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree)' ++ mkdir asubdir ++ echo tree1path0 ++ echo tree1path1 ++ echo tree1path3 ++ echo tree1path4 ++ echo tree1asubdir/path5 ++ git update-index --add path0 path1 path3 path4 asubdir/path5 +++ git write-tree ++ t1=55e7ce41e13ffba28c4b9d7b40c5b338786c48b5 ++ rm -f path0 path1 path3 path4 '.merge_*' out .git/index ++ echo tree2path0 ++ echo tree2path1 ++ echo tree2path2 ++ echo tree2path4 ++ git update-index --add path0 path1 path2 path4 +++ git write-tree ++ t2=9ad8b17bf35b3a2e8f34dc723dd036870eaf5ecf ++ rm -f path0 path1 path2 path4 '.merge_*' out .git/index ++ echo tree2path0 ++ echo tree3path1 ++ echo tree3path2 ++ echo tree3path3 ++ git update-index --add path0 path1 path2 path3 +++ git write-tree ++ t3=869c54176b16104872b38d0471bc4fcc35f46beb + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ preparation ++ expr 0 + 1 + test_count=1 + say_color '' ' ok 1: preparation' + test -z '' + test -n '' + shift + echo '* ok 1: preparation' + echo '' + test_expect_success 'checkout one stage 0 to temporary file' ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' + test 2 = 2 + test_skip 'checkout one stage 0 to temporary file' ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 1 + 1 + this_test=t2004.2 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' + say_color info 'expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' + test_run_ ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' + eval ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1' ++ rm -f path0 path1 path2 path3 '.merge_*' out .git/index ++ git read-tree 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5 ++ git checkout-index --temp -- path1 +++ wc -l ++ test 1 = 1 +++ cut '-d ' -f2 out ++ test path1 = path1 +++ cut '-d ' -f1 out ++ p=.merge_file_SkWrTm ++ test -f .merge_file_SkWrTm +++ cat .merge_file_SkWrTm ++ test tree1path1 = tree1path1 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout one stage 0 to temporary file' ++ expr 1 + 1 + test_count=2 + say_color '' ' ok 2: checkout one stage 0 to temporary file' + test -z '' + test -n '' + shift + echo '* ok 2: checkout one stage 0 to temporary file' + echo '' + test_expect_success 'checkout all stage 0 to temporary files' ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' + test 2 = 2 + test_skip 'checkout all stage 0 to temporary files' ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 2 + 1 + this_test=t2004.3 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' + say_color info 'expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' + test_run_ ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' + eval ' rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done' ++ rm -f 'path*' .merge_file_SkWrTm out .git/index ++ git read-tree 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5 ++ git checkout-index -a --temp +++ wc -l ++ test 5 = 5 +++ cut '-d ' -f2 +++ grep path0 out ++ test path0 = path0 +++ grep path0 out +++ cut '-d ' -f1 ++ p=.merge_file_umMWZK ++ test -f .merge_file_umMWZK +++ cat .merge_file_umMWZK ++ test tree1path0 = tree1path0 +++ grep path1 out +++ cut '-d ' -f2 ++ test path1 = path1 +++ cut '-d ' -f1 +++ grep path1 out ++ p=.merge_file_pqCP9Q ++ test -f .merge_file_pqCP9Q +++ cat .merge_file_pqCP9Q ++ test tree1path1 = tree1path1 +++ grep path3 out +++ cut '-d ' -f2 ++ test path3 = path3 +++ grep path3 out +++ cut '-d ' -f1 ++ p=.merge_file_htNBuR ++ test -f .merge_file_htNBuR +++ cat .merge_file_htNBuR ++ test tree1path3 = tree1path3 +++ cut '-d ' -f2 +++ grep path4 out ++ test path4 = path4 +++ grep path4 out +++ cut '-d ' -f1 ++ p=.merge_file_wK37Ga ++ test -f .merge_file_wK37Ga +++ cat .merge_file_wK37Ga ++ test tree1path4 = tree1path4 +++ grep asubdir/path5 out +++ cut '-d ' -f2 ++ test asubdir/path5 = asubdir/path5 +++ grep asubdir/path5 out +++ cut '-d ' -f1 ++ p=.merge_file_HHTltB ++ test -f .merge_file_HHTltB +++ cat .merge_file_HHTltB ++ test tree1asubdir/path5 = tree1asubdir/path5 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout all stage 0 to temporary files' ++ expr 2 + 1 + test_count=3 + say_color '' ' ok 3: checkout all stage 0 to temporary files' + test -z '' + test -n '' + shift + echo '* ok 3: checkout all stage 0 to temporary files' + echo '' + test_expect_success 'prepare 3-way merge' ' rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' + test 2 = 2 + test_skip 'prepare 3-way merge' ' rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 3 + 1 + this_test=t2004.4 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' + say_color info 'expecting success: rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' + test_run_ ' rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' + eval ' rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3' ++ rm -f 'path*' .merge_file_HHTltB .merge_file_htNBuR .merge_file_pqCP9Q .merge_file_umMWZK .merge_file_wK37Ga out .git/index ++ git read-tree -m 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5 9ad8b17bf35b3a2e8f34dc723dd036870eaf5ecf 869c54176b16104872b38d0471bc4fcc35f46beb + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'prepare 3-way merge' ++ expr 3 + 1 + test_count=4 + say_color '' ' ok 4: prepare 3-way merge' + test -z '' + test -n '' + shift + echo '* ok 4: prepare 3-way merge' + echo '' + test_expect_success 'checkout one stage 2 to temporary file' ' rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' + test 2 = 2 + test_skip 'checkout one stage 2 to temporary file' ' rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 4 + 1 + this_test=t2004.5 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' + test_run_ ' rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' + eval ' rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1' ++ rm -f 'path*' '.merge_*' out ++ git checkout-index --stage=2 --temp -- path1 +++ wc -l ++ test 1 = 1 +++ cut '-d ' -f2 out ++ test path1 = path1 +++ cut '-d ' -f1 out ++ p=.merge_file_Pq7U41 ++ test -f .merge_file_Pq7U41 +++ cat .merge_file_Pq7U41 ++ test tree2path1 = tree2path1 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout one stage 2 to temporary file' ++ expr 4 + 1 + test_count=5 + say_color '' ' ok 5: checkout one stage 2 to temporary file' + test -z '' + test -n '' + shift + echo '* ok 5: checkout one stage 2 to temporary file' + echo '' + test_expect_success 'checkout all stage 2 to temporary files' ' rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' + test 2 = 2 + test_skip 'checkout all stage 2 to temporary files' ' rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 5 + 1 + this_test=t2004.6 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' + test_run_ ' rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' + eval ' rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done' ++ rm -f 'path*' .merge_file_Pq7U41 out ++ git checkout-index --all --stage=2 --temp +++ wc -l ++ test 3 = 3 +++ grep path1 out +++ cut '-d ' -f2 ++ test path1 = path1 +++ grep path1 out +++ cut '-d ' -f1 ++ p=.merge_file_bE0Spf ++ test -f .merge_file_bE0Spf +++ cat .merge_file_bE0Spf ++ test tree2path1 = tree2path1 +++ grep path2 out +++ cut '-d ' -f2 ++ test path2 = path2 +++ grep path2 out +++ cut '-d ' -f1 ++ p=.merge_file_tAZ3x2 ++ test -f .merge_file_tAZ3x2 +++ cat .merge_file_tAZ3x2 ++ test tree2path2 = tree2path2 +++ cut '-d ' -f2 +++ grep path4 out ++ test path4 = path4 +++ grep path4 out +++ cut '-d ' -f1 ++ p=.merge_file_5R9M2N ++ test -f .merge_file_5R9M2N +++ cat .merge_file_5R9M2N ++ test tree2path4 = tree2path4 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout all stage 2 to temporary files' ++ expr 5 + 1 + test_count=6 + say_color '' ' ok 6: checkout all stage 2 to temporary files' + test -z '' + test -n '' + shift + echo '* ok 6: checkout all stage 2 to temporary files' + echo '' + test_expect_success 'checkout all stages/one file to nothing' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' + test 2 = 2 + test_skip 'checkout all stages/one file to nothing' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 6 + 1 + this_test=t2004.7 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' + test_run_ ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' + eval ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0' ++ rm -f 'path*' .merge_file_5R9M2N .merge_file_bE0Spf .merge_file_tAZ3x2 out ++ git checkout-index --stage=all --temp -- path0 git-checkout-index: path0 does not exist at stage 4 +++ wc -l ++ test 0 = 0 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout all stages/one file to nothing' ++ expr 6 + 1 + test_count=7 + say_color '' ' ok 7: checkout all stages/one file to nothing' + test -z '' + test -n '' + shift + echo '* ok 7: checkout all stages/one file to nothing' + echo '' + test_expect_success 'checkout all stages/one file to temporary files' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test 2 = 2 + test_skip 'checkout all stages/one file to temporary files' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 7 + 1 + this_test=t2004.8 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test_run_ ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + eval ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' ++ rm -f 'path*' '.merge_*' out ++ git checkout-index --stage=all --temp -- path1 +++ wc -l ++ test 1 = 1 +++ cut '-d ' -f2 out ++ test path1 = path1 ++ cut '-d ' -f1 out ++ read s1 s2 s3 ++ test -f .merge_file_JSK1BD ++ test -f .merge_file_zH0Aoa ++ test -f .merge_file_8ToCkP +++ cat .merge_file_JSK1BD ++ test tree1path1 = tree1path1 +++ cat .merge_file_zH0Aoa ++ test tree2path1 = tree2path1 +++ cat .merge_file_8ToCkP ++ test tree3path1 = tree3path1 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout all stages/one file to temporary files' ++ expr 7 + 1 + test_count=8 + say_color '' ' ok 8: checkout all stages/one file to temporary files' + test -z '' + test -n '' + shift + echo '* ok 8: checkout all stages/one file to temporary files' + echo '' + test_expect_success 'checkout some stages/one file to temporary files' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test 2 = 2 + test_skip 'checkout some stages/one file to temporary files' ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 8 + 1 + this_test=t2004.9 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test_run_ ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + eval ' rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' ++ rm -f 'path*' .merge_file_8ToCkP .merge_file_JSK1BD .merge_file_zH0Aoa out ++ git checkout-index --stage=all --temp -- path2 +++ wc -l ++ test 1 = 1 +++ cut '-d ' -f2 out ++ test path2 = path2 ++ cut '-d ' -f1 out ++ read s1 s2 s3 ++ test . = . ++ test -f .merge_file_0O9Rze ++ test -f .merge_file_4ya4xG +++ cat .merge_file_0O9Rze ++ test tree2path2 = tree2path2 +++ cat .merge_file_4ya4xG ++ test tree3path2 = tree3path2 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout some stages/one file to temporary files' ++ expr 8 + 1 + test_count=9 + say_color '' ' ok 9: checkout some stages/one file to temporary files' + test -z '' + test -n '' + shift + echo '* ok 9: checkout some stages/one file to temporary files' + echo '' + test_expect_success 'checkout all stages/all files to temporary files' ' rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' + test 2 = 2 + test_skip 'checkout all stages/all files to temporary files' ' rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 9 + 1 + this_test=t2004.10 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' + say_color info 'expecting success: rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' + test_run_ ' rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' + eval ' rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5' ++ rm -f 'path*' .merge_file_0O9Rze .merge_file_4ya4xG out ++ git checkout-index -a --stage=all --temp +++ wc -l ++ test 5 = 5 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout all stages/all files to temporary files' ++ expr 9 + 1 + test_count=10 + say_color '' ' ok 10: checkout all stages/all files to temporary files' + test -z '' + test -n '' + shift + echo '* ok 10: checkout all stages/all files to temporary files' + echo '' + test_expect_success '-- path0: no entry' ' test x$(grep path0 out | cut "-d " -f2) = x' + test 2 = 2 + test_skip '-- path0: no entry' ' test x$(grep path0 out | cut "-d " -f2) = x' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 10 + 1 + this_test=t2004.11 + to_skip= + false + say 'expecting success: test x$(grep path0 out | cut "-d " -f2) = x' + say_color info 'expecting success: test x$(grep path0 out | cut "-d " -f2) = x' + test -z info + shift + echo '* expecting success: test x$(grep path0 out | cut "-d " -f2) = x' + test_run_ ' test x$(grep path0 out | cut "-d " -f2) = x' + eval ' test x$(grep path0 out | cut "-d " -f2) = x' +++ grep path0 out +++ cut '-d ' -f2 ++ test x = x + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- path0: no entry' ++ expr 10 + 1 + test_count=11 + say_color '' ' ok 11: -- path0: no entry' + test -z '' + test -n '' + shift + echo '* ok 11: -- path0: no entry' + echo '' + test_expect_success '-- path1: all 3 stages' ' test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test 2 = 2 + test_skip '-- path1: all 3 stages' ' test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 11 + 1 + this_test=t2004.12 + to_skip= + false + say 'expecting success: test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + say_color info 'expecting success: test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test -z info + shift + echo '* expecting success: test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + test_run_ ' test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' + eval ' test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1)' +++ grep path1 out +++ cut '-d ' -f2 ++ test path1 = path1 ++ grep path1 out ++ cut '-d ' -f1 ++ read s1 s2 s3 ++ test -f .merge_file_h8tXrD ++ test -f .merge_file_rN8rTd ++ test -f .merge_file_dmW8IZ +++ cat .merge_file_h8tXrD ++ test tree1path1 = tree1path1 +++ cat .merge_file_rN8rTd ++ test tree2path1 = tree2path1 +++ cat .merge_file_dmW8IZ ++ test tree3path1 = tree3path1 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- path1: all 3 stages' ++ expr 11 + 1 + test_count=12 + say_color '' ' ok 12: -- path1: all 3 stages' + test -z '' + test -n '' + shift + echo '* ok 12: -- path1: all 3 stages' + echo '' + test_expect_success '-- path2: no stage 1, have stage 2 and 3' ' test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test 2 = 2 + test_skip '-- path2: no stage 1, have stage 2 and 3' ' test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 12 + 1 + this_test=t2004.13 + to_skip= + false + say 'expecting success: test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + say_color info 'expecting success: test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test -z info + shift + echo '* expecting success: test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + test_run_ ' test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' + eval ' test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2)' +++ grep path2 out +++ cut '-d ' -f2 ++ test path2 = path2 ++ grep path2 out ++ cut '-d ' -f1 ++ read s1 s2 s3 ++ test . = . ++ test -f .merge_file_jmbxjv ++ test -f .merge_file_8cWHrQ +++ cat .merge_file_jmbxjv ++ test tree2path2 = tree2path2 +++ cat .merge_file_8cWHrQ ++ test tree3path2 = tree3path2 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- path2: no stage 1, have stage 2 and 3' ++ expr 12 + 1 + test_count=13 + say_color '' ' ok 13: -- path2: no stage 1, have stage 2 and 3' + test -z '' + test -n '' + shift + echo '* ok 13: -- path2: no stage 1, have stage 2 and 3' + echo '' + test_expect_success '-- path3: no stage 2, have stage 1 and 3' ' test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' + test 2 = 2 + test_skip '-- path3: no stage 2, have stage 1 and 3' ' test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 13 + 1 + this_test=t2004.14 + to_skip= + false + say 'expecting success: test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' + say_color info 'expecting success: test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' + test -z info + shift + echo '* expecting success: test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' + test_run_ ' test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' + eval ' test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3)' +++ grep path3 out +++ cut '-d ' -f2 ++ test path3 = path3 ++ grep path3 out ++ cut '-d ' -f1 ++ read s1 s2 s3 ++ test -f .merge_file_6iyvpx ++ test . = . ++ test -f .merge_file_bFIigi +++ cat .merge_file_6iyvpx ++ test tree1path3 = tree1path3 +++ cat .merge_file_bFIigi ++ test tree3path3 = tree3path3 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- path3: no stage 2, have stage 1 and 3' ++ expr 13 + 1 + test_count=14 + say_color '' ' ok 14: -- path3: no stage 2, have stage 1 and 3' + test -z '' + test -n '' + shift + echo '* ok 14: -- path3: no stage 2, have stage 1 and 3' + echo '' + test_expect_success '-- path4: no stage 3, have stage 1 and 3' ' test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' + test 2 = 2 + test_skip '-- path4: no stage 3, have stage 1 and 3' ' test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 14 + 1 + this_test=t2004.15 + to_skip= + false + say 'expecting success: test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' + say_color info 'expecting success: test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' + test -z info + shift + echo '* expecting success: test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' + test_run_ ' test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' + eval ' test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4)' +++ grep path4 out +++ cut '-d ' -f2 ++ test path4 = path4 ++ grep path4 out ++ cut '-d ' -f1 ++ read s1 s2 s3 ++ test -f .merge_file_f0hTvT ++ test -f .merge_file_sYiYst ++ test . = . +++ cat .merge_file_f0hTvT ++ test tree1path4 = tree1path4 +++ cat .merge_file_sYiYst ++ test tree2path4 = tree2path4 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- path4: no stage 3, have stage 1 and 3' ++ expr 14 + 1 + test_count=15 + say_color '' ' ok 15: -- path4: no stage 3, have stage 1 and 3' + test -z '' + test -n '' + shift + echo '* ok 15: -- path4: no stage 3, have stage 1 and 3' + echo '' + test_expect_success '-- asubdir/path5: no stage 2 and 3 have stage 1' ' test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' + test 2 = 2 + test_skip '-- asubdir/path5: no stage 2 and 3 have stage 1' ' test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 15 + 1 + this_test=t2004.16 + to_skip= + false + say 'expecting success: test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' + say_color info 'expecting success: test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' + test -z info + shift + echo '* expecting success: test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' + test_run_ ' test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' + eval ' test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5)' +++ grep asubdir/path5 out +++ cut '-d ' -f2 ++ test asubdir/path5 = asubdir/path5 ++ grep asubdir/path5 out ++ cut '-d ' -f1 ++ read s1 s2 s3 ++ test -f .merge_file_lcEv2j ++ test . = . ++ test . = . +++ cat .merge_file_lcEv2j ++ test tree1asubdir/path5 = tree1asubdir/path5 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ '-- asubdir/path5: no stage 2 and 3 have stage 1' ++ expr 15 + 1 + test_count=16 + say_color '' ' ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1' + test -z '' + test -n '' + shift + echo '* ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1' + echo '' + test_expect_success 'checkout --temp within subdir' ' (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' + test 2 = 2 + test_skip 'checkout --temp within subdir' ' (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 16 + 1 + this_test=t2004.17 + to_skip= + false + say 'expecting success: (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' + say_color info 'expecting success: (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' + test -z info + shift + echo '* expecting success: (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' + test_run_ ' (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' + eval ' (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) )' ++ cd asubdir ++ git checkout-index -a --stage=all +++ wc -l ++ test 1 = 1 +++ grep path5 out +++ cut '-d ' -f2 ++ test path5 = path5 ++ grep path5 out ++ read s1 s2 s3 ++ cut '-d ' -f1 ++ test -f ../.merge_file_PGoCjL ++ test . = . ++ test . = . +++ cat ../.merge_file_PGoCjL ++ test tree1asubdir/path5 = tree1asubdir/path5 + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout --temp within subdir' ++ expr 16 + 1 + test_count=17 + say_color '' ' ok 17: checkout --temp within subdir' + test -z '' + test -n '' + shift + echo '* ok 17: checkout --temp within subdir' + echo '' + test_expect_success 'checkout --temp symlink' ' rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' + test 2 = 2 + test_skip 'checkout --temp symlink' ' rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' ++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$' + this_test=t2004 ++ expr 17 + 1 + this_test=t2004.18 + to_skip= + false + say 'expecting success: rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' + say_color info 'expecting success: rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' + test -z info + shift + echo '* expecting success: rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' + test_run_ ' rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' + eval ' rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b' ++ rm -f 'path*' .merge_file_6iyvpx .merge_file_8cWHrQ .merge_file_PGoCjL .merge_file_bFIigi .merge_file_dmW8IZ .merge_file_f0hTvT .merge_file_h8tXrD .merge_file_jmbxjv .merge_file_lcEv2j .merge_file_rN8rTd .merge_file_sYiYst out .git/index ++ ln -s b a ++ git update-index --add a +++ git write-tree ++ t4=79c8f43fc2b6210c5badb2c13595654b6c40b974 ++ rm -f .git/index ++ git read-tree 79c8f43fc2b6210c5badb2c13595654b6c40b974 ++ git checkout-index --temp -a +++ wc -l ++ test 1 = 1 +++ cut '-d ' -f2 out ++ test a = a +++ cut '-d ' -f1 out ++ p=.merge_link_RykTWo ++ test -f .merge_link_RykTWo +++ cat .merge_link_RykTWo ++ test b = b + eval_ret=0 + return 0 + '[' 0 = 0 -a 0 = 0 ']' + test_ok_ 'checkout --temp symlink' ++ expr 17 + 1 + test_count=18 + say_color '' ' ok 18: checkout --temp symlink' + test -z '' + test -n '' + shift + echo '* ok 18: checkout --temp symlink' + echo '' + test_done + trap - exit + test 0 '!=' 0 + test 0 '!=' 0 + msg=18 test(s) + say_color pass 'passed all 18 test(s)' + test -z pass + shift + echo '* passed all 18 test(s)' + exit 0
* expecting success: mkdir asubdir && echo tree1path0 >path0 && echo tree1path1 >path1 && echo tree1path3 >path3 && echo tree1path4 >path4 && echo tree1asubdir/path5 >asubdir/path5 && git update-index --add path0 path1 path3 path4 asubdir/path5 && t1=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree2path1 >path1 && echo tree2path2 >path2 && echo tree2path4 >path4 && git update-index --add path0 path1 path2 path4 && t2=$(git write-tree) && rm -f path* .merge_* out .git/index && echo tree2path0 >path0 && echo tree3path1 >path1 && echo tree3path2 >path2 && echo tree3path3 >path3 && git update-index --add path0 path1 path2 path3 && t3=$(git write-tree) * ok 1: preparation * expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree1path1 * ok 2: checkout one stage 0 to temporary file * expecting success: rm -f path* .merge_* out .git/index && git read-tree $t1 && git checkout-index -a --temp >out && test $(wc -l <out) = 5 && for f in path0 path1 path3 path4 asubdir/path5 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree1$f done * ok 3: checkout all stage 0 to temporary files * expecting success: rm -f path* .merge_* out .git/index && git read-tree -m $t1 $t2 $t3 * ok 4: prepare 3-way merge * expecting success: rm -f path* .merge_* out && git checkout-index --stage=2 --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = tree2path1 * ok 5: checkout one stage 2 to temporary file * expecting success: rm -f path* .merge_* out && git checkout-index --all --stage=2 --temp >out && test $(wc -l <out) = 3 && for f in path1 path2 path4 do test $(grep $f out | cut "-d " -f2) = $f && p=$(grep $f out | cut "-d " -f1) && test -f $p && test $(cat $p) = tree2$f done * ok 6: checkout all stage 2 to temporary files * expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path0 >out && test $(wc -l <out) = 0 * ok 7: checkout all stages/one file to nothing * expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path1 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path1 && cut "-d " -f1 out | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1) * ok 8: checkout all stages/one file to temporary files * expecting success: rm -f path* .merge_* out && git checkout-index --stage=all --temp -- path2 >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = path2 && cut "-d " -f1 out | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2) * ok 9: checkout some stages/one file to temporary files * expecting success: rm -f path* .merge_* out && git checkout-index -a --stage=all --temp >out && test $(wc -l <out) = 5 * ok 10: checkout all stages/all files to temporary files * expecting success: test x$(grep path0 out | cut "-d " -f2) = x * ok 11: -- path0: no entry * expecting success: test $(grep path1 out | cut "-d " -f2) = path1 && grep path1 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test -f $s3 && test $(cat $s1) = tree1path1 && test $(cat $s2) = tree2path1 && test $(cat $s3) = tree3path1) * ok 12: -- path1: all 3 stages * expecting success: test $(grep path2 out | cut "-d " -f2) = path2 && grep path2 out | cut "-d " -f1 | (read s1 s2 s3 && test $s1 = . && test -f $s2 && test -f $s3 && test $(cat $s2) = tree2path2 && test $(cat $s3) = tree3path2) * ok 13: -- path2: no stage 1, have stage 2 and 3 * expecting success: test $(grep path3 out | cut "-d " -f2) = path3 && grep path3 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test -f $s3 && test $(cat $s1) = tree1path3 && test $(cat $s3) = tree3path3) * ok 14: -- path3: no stage 2, have stage 1 and 3 * expecting success: test $(grep path4 out | cut "-d " -f2) = path4 && grep path4 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test -f $s2 && test $s3 = . && test $(cat $s1) = tree1path4 && test $(cat $s2) = tree2path4) * ok 15: -- path4: no stage 3, have stage 1 and 3 * expecting success: test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 && grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f $s1 && test $s2 = . && test $s3 = . && test $(cat $s1) = tree1asubdir/path5) * ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1 * expecting success: (cd asubdir && git checkout-index -a --stage=all >out && test $(wc -l <out) = 1 && test $(grep path5 out | cut "-d " -f2) = path5 && grep path5 out | cut "-d " -f1 | (read s1 s2 s3 && test -f ../$s1 && test $s2 = . && test $s3 = . && test $(cat ../$s1) = tree1asubdir/path5) ) * ok 17: checkout --temp within subdir * expecting success: rm -f path* .merge_* out .git/index && ln -s b a && git update-index --add a && t4=$(git write-tree) && rm -f .git/index && git read-tree $t4 && git checkout-index --temp -a >out && test $(wc -l <out) = 1 && test $(cut "-d " -f2 out) = a && p=$(cut "-d " -f1 out) && test -f $p && test $(cat $p) = b * ok 18: checkout --temp symlink * passed all 18 test(s)