+copy-check-good () {
+ git diff $vtag
+ t-refs-same refs/remotes/dgit/dgit/stable
+ t-ref-head
+}
+
+copy-check () {
+ local vm=$1
+ t-inarchive-copy $vm
+
+ vtag=$(v=$vm t-v-tag)
+
+ cd $p
+ t-refs-same-start
+ t-ref-same $vtag^1
+
+ t-dgit fetch stable
+ git merge --ff-only dgit/dgit/stable
+
+ copy-check-good
+ local fetched=$(t-sametree-parent HEAD)
+ cd ..
+
+ rm -rf example.cloned
+ t-dgit clone $p stable example.cloned
+
+ cd example.cloned
+ t-refs-same-start
+ copy-check-good
+ local cloned=$(t-sametree-parent HEAD)
+ cd ..
+
+ t-refs-same-start
+ t-ref-same-val fetched $fetched
+ t-ref-same-val cloned $cloned
+}
+
+copy-check 2.0