aboutsummaryrefslogtreecommitdiff
path: root/t/t6029-merge-subtree.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-23 11:08:25 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-23 11:14:56 -0800
commit1736855c9b59ac787af979a44840a58361cbaf66 (patch)
treef7193190c01e6c995dcdeecee8c7270183f34c45 /t/t6029-merge-subtree.sh
parentb56fca07d2bac20339d59218ab98de38a9363e77 (diff)
downloadgit-1736855c9b59ac787af979a44840a58361cbaf66.tar.gz
git-1736855c9b59ac787af979a44840a58361cbaf66.tar.xz
Add merge-subtree back
An earlier commit e1b3a2c (Build-in merge-recursive) made the subtree merge strategy backend unavailable. This resurrects it. A new test t6029 currently only tests the strategy is available, but it should be enhanced to check the real "subtree" case. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6029-merge-subtree.sh')
-rwxr-xr-xt/t6029-merge-subtree.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t6029-merge-subtree.sh b/t/t6029-merge-subtree.sh
new file mode 100755
index 000000000..3900a0508
--- /dev/null
+++ b/t/t6029-merge-subtree.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+test_description='subtree merge strategy'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ s="1 2 3 4 5 6 7 8"
+ for i in $s; do echo $i; done >hello &&
+ git add hello &&
+ git commit -m initial &&
+ git checkout -b side &&
+ echo >>hello world &&
+ git add hello &&
+ git commit -m second &&
+ git checkout master &&
+ for i in mundo $s; do echo $i; done >hello &&
+ git add hello &&
+ git commit -m master
+
+'
+
+test_expect_success 'subtree available and works like recursive' '
+
+ git merge -s subtree side &&
+ for i in mundo $s world; do echo $i; done >expect &&
+ diff -u expect hello
+
+'
+
+test_done