chiark / gitweb /
git-debrebase: test suite: t-gdr-good: fix comment
[dgit.git] / tests / lib-gdr
index 565e0b167ad1c104cd026e92c9637eda368c0775..c80dead656ade953a80a2c8ef836a50c15a3bc09 100644 (file)
@@ -18,7 +18,7 @@ t-gdr-good () {
        # state should be one of
        #   laundered
        #   stitched
-       #   patches
+       #   pushed
 
        git diff --quiet ${beforetag-t.before} -- ':.' ':!debian/patches'
 
@@ -78,6 +78,16 @@ t-gdr-good () {
                        enparents=2
                        git diff --quiet $expect..$cid
                        etype=Upstream
+
+                       : 'reject pointless pseudomerges'
+                       local overwritten=${parents/$expect/}
+                       overwritten=${overwritten// /}
+                       t-git-debrebase analyse $overwritten >../anal.overwr
+                       local ocid otype oinfo
+                       read <../anal.overwr ocid otype oinfo
+                       case "$otype" in
+                       Pseudomerge) test "x$info" != "x$oinfo" ;;
+                       esac
                        ;;
                Packaging)
                        git diff --quiet $expect..$cid -- ':.' ':!debian' 
@@ -106,6 +116,11 @@ t-gdr-good () {
                local cnparents=`printf "%s" "$parents" | wc -w`
                test $cnparents = $enparents
 
+               local cndparents=`
+       for f in $parents; do echo $f; done | sort -u | wc -w
+                               `
+               test $cndparents = $cnparents
+
                case "$parents" in
                *"$expect"*)    ;;
                *)              fail 'unexpected parent' ;;