+
+# check if split can find proper base without --onto
+# prepare second pair of repositories
+mkdir test2
+cd test2
+
+mkdir main
+cd main
+git init
+create main1
+git commit -m "main1"
+
+cd ..
+mkdir sub
+cd sub
+git init
+create sub2
+git commit -m "sub2"
+
+cd ../main
+git fetch ../sub master
+git branch sub2 FETCH_HEAD
+git subtree add --prefix subdir sub2
+
+cd ../sub
+create sub3
+git commit -m "sub3"
+
+cd ../main
+git fetch ../sub master
+git branch sub3 FETCH_HEAD
+git subtree merge --prefix subdir sub3
+
+create subdir/main-sub4
+git commit -m "main-sub4"
+git subtree split --prefix subdir --branch mainsub4
+
+# at this point, the new commit's parent should be sub3
+# if it's not, something went wrong (the "newparent" of "master~" commit should have been sub3,
+# but it wasn't, because it's cache was not set to itself)
+check_equal "$(git log --format=%P -1 mainsub4)" "$(git rev-parse sub3)"
+
+
+