git-checkout-cache -u -f -q -a &&
git-update-cache --add yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >4.out || exit
+ git-ls-files --stage >4.out || return 1
diff -u M.out 4.out >4diff.out
compare_change 4diff.out expected &&
check_cache_at yomin clean'
git-update-cache --add yomin &&
echo yomin yomin >yomin &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >5.out || exit
+ git-ls-files --stage >5.out || return 1
diff -u M.out 5.out >5diff.out
compare_change 5diff.out expected &&
check_cache_at yomin dirty'
echo nitfol nitfol >nitfol &&
git-update-cache --add nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >14.out || exit
+ git-ls-files --stage >14.out || return 1
diff -u M.out 14.out >14diff.out
compare_change 14diff.out expected &&
check_cache_at nitfol clean'
git-update-cache --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >15.out || exit
+ git-ls-files --stage >15.out || return 1
diff -u M.out 15.out >15diff.out
compare_change 15diff.out expected &&
check_cache_at nitfol dirty'
sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
git-update-cache --add bozbar &&
read_tree_twoway $treeH $treeM &&
- git-ls-files --stage >22.out || exit
+ git-ls-files --stage >22.out || return 1
diff -u M.out 22.out >22diff.out
compare_change 22diff.out &&
check_cache_at bozbar clean'
treeDF=`git-write-tree` &&
echo treeDF $treeDF &&
git-ls-tree $treeDF &&
+ git-ls-files --stage >DF.out
rm -f DF &&
mkdir DF &&
git-ls-files --stage >DFDF.out'
test_expect_success \
- 'DF vs DF/DF case test.' \
+ 'DF vs DF/DF case test (#1)' \
'rm -f .git/index &&
rm -fr DF &&
echo DF >DF &&
check_cache_at DF/DF clean && # different from pure 2-way
:'
+# The other way around
+test_expect_success \
+ 'DF vs DF/DF case test (#2)' \
+ 'rm -f .git/index &&
+ rm -fr DF &&
+ mkdir DF &&
+ echo DF/DF >DF/DF &&
+ git-update-cache --add DF/DF &&
+ read_tree_twoway $treeDFDF $treeDF &&
+ git-ls-files --stage >DFDFcheck.out &&
+ diff -u DF.out DFDFcheck.out &&
+ check_cache_at DF clean && # different from pure 2-way
+ :'
+
# Emu23 can grok I having more than H. Make sure we did not
-# botch the conflict tests (Linus code botches this test).
+# botch the conflict tests (fixed).
test_expect_success \
- 'DF vs DF/DF case test (#2).' \
+ 'DF vs DF/DF case test (#3).' \
'rm -f .git/index &&
rm -fr DF &&
mkdir DF &&
# This should fail because I and H have a conflict
# at DF.
if git-read-tree --emu23 $treeDF $treeDFDF
- then true ;# should be false
- else false ;# should be true
+ then false
+ else true
fi'
test_done