summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9de535)
raw | patch | inline | side by side (parent: b9de535)
author | Avery Pennarun <apenwarr@gmail.com> | |
Sat, 25 Apr 2009 04:07:04 +0000 (00:07 -0400) | ||
committer | Avery Pennarun <apenwarr@gmail.com> | |
Sat, 25 Apr 2009 04:07:04 +0000 (00:07 -0400) |
test.sh | patch | blob | history |
index dac9b3559af93c633a2c752cbf2efb2bdbfb7c5e..16fb8f217e17d4dfcf4e652d0ea633a33d559737 100755 (executable)
--- a/test.sh
+++ b/test.sh
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
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)
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