Change test.sh to test the new add, merge, and pull commands.
Avery Pennarun committed
Apr 25, 2009 at 00:07 UTC
a13a299996725a979f5a7d6bd878b0237de0f26d
1 file changed
+4
-8
test.sh
+4
-8
@@ -33,13 +33,9 @@ git branch -m master mainline
33
34
git fetch ../subproj sub1
35
git branch sub1 FETCH_HEAD
36
-git read-tree --prefix=subdir FETCH_HEAD
37
-git checkout subdir
38
-tree=$(git write-tree)
39
-com=$(echo initial-subdir-merge | git commit-tree $tree -p HEAD -p FETCH_HEAD)
40
-git reset $com
41
-#git commit -m 'initial-subdir-merge'
36
+git subtree add --prefix=subdir FETCH_HEAD
37
38
+# this shouldn't actually do anything, since FETCH_HEAD is already a parent
39
git merge -m 'merge -s -ours' -s ours FETCH_HEAD
40
41
touch subdir/main-sub3
@@ -56,7 +52,7 @@ git commit -m 'main-sub4'
52
53
git fetch ../subproj sub2
54
git branch sub2 FETCH_HEAD
59
-git merge -s subtree FETCH_HEAD
55
+git subtree merge --prefix=subdir FETCH_HEAD
56
git branch pre-split
57
58
split1=$(git subtree split --prefix subdir --onto FETCH_HEAD --rejoin)
@@ -96,4 +92,4 @@ git branch subproj-merge-split3
92
cd ../mainline
93
git fetch ../subproj subproj-merge-split3
94
git branch subproj-merge-split3 FETCH_HEAD
99
-git merge -s subtree subproj-merge-split3
95
+git subtree pull --prefix=subdir ../subproj subproj-merge-split3