summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Avery Pennarun <apenwarr@gmail.com>2009-04-25 00:07:04 -0400
committerLibravatar Avery Pennarun <apenwarr@gmail.com>2009-04-25 00:07:04 -0400
commita13a299996725a979f5a7d6bd878b0237de0f26d (patch)
tree6bd15db18ecc19b08a9b6ae4642a24227fd9ea45
parentHandle it successfully if a given parent commit has no parents. (diff)
downloadtgif-a13a299996725a979f5a7d6bd878b0237de0f26d.tar.xz
Change test.sh to test the new add, merge, and pull commands.
-rwxr-xr-xtest.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/test.sh b/test.sh
index dac9b3559a..16fb8f217e 100755
--- a/test.sh
+++ b/test.sh
@@ -33,13 +33,9 @@ git branch -m master mainline
git fetch ../subproj sub1
git branch sub1 FETCH_HEAD
-git read-tree --prefix=subdir FETCH_HEAD
-git checkout subdir
-tree=$(git write-tree)
-com=$(echo initial-subdir-merge | git commit-tree $tree -p HEAD -p FETCH_HEAD)
-git reset $com
-#git commit -m 'initial-subdir-merge'
+git subtree add --prefix=subdir FETCH_HEAD
+# this shouldn't actually do anything, since FETCH_HEAD is already a parent
git merge -m 'merge -s -ours' -s ours FETCH_HEAD
touch subdir/main-sub3
@@ -56,7 +52,7 @@ git commit -m 'main-sub4'
git fetch ../subproj sub2
git branch sub2 FETCH_HEAD
-git merge -s subtree FETCH_HEAD
+git subtree merge --prefix=subdir FETCH_HEAD
git branch pre-split
split1=$(git subtree split --prefix subdir --onto FETCH_HEAD --rejoin)
@@ -96,4 +92,4 @@ git branch subproj-merge-split3
cd ../mainline
git fetch ../subproj subproj-merge-split3
git branch subproj-merge-split3 FETCH_HEAD
-git merge -s subtree subproj-merge-split3
+git subtree pull --prefix=subdir ../subproj subproj-merge-split3