diff options
Diffstat (limited to 't/t1004-read-tree-m-u-wf.sh')
-rwxr-xr-x | t/t1004-read-tree-m-u-wf.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh index 9d1371c2c6..283e77cc51 100755 --- a/t/t1004-read-tree-m-u-wf.sh +++ b/t/t1004-read-tree-m-u-wf.sh @@ -157,4 +157,50 @@ test_expect_success '3-way not overwriting local changes (their side)' ' ' +test_expect_success 'D/F setup' ' + + git reset --hard && + + git checkout side-a && + rm -f subdir/file2 && + mkdir subdir/file2 && + echo qfwfq >subdir/file2/another && + git add subdir/file2/another && + test_tick && + git commit -m "side-a changes file2 to directory" + +' + +test_expect_success 'D/F' ' + + git checkout side-b && + git read-tree -m -u branch-point side-b side-a && + git ls-files -u >actual && + ( + a=$(git rev-parse branch-point:subdir/file2) + b=$(git rev-parse side-a:subdir/file2/another) + echo "100644 $a 1 subdir/file2" + echo "100644 $a 2 subdir/file2" + echo "100644 $b 3 subdir/file2/another" + ) >expect && + test_cmp actual expect + +' + +test_expect_success 'D/F resolve' ' + + git reset --hard && + git checkout side-b && + git merge-resolve branch-point -- side-b side-a + +' + +test_expect_success 'D/F recursive' ' + + git reset --hard && + git checkout side-b && + git merge-recursive branch-point -- side-b side-a + +' + test_done |