X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib-gdr;h=c80dead656ade953a80a2c8ef836a50c15a3bc09;hb=b95109f18261edb47dda96bfd160fb2b79e39a41;hp=565e0b167ad1c104cd026e92c9637eda368c0775;hpb=7faed22010cacb9bd7cc029b860840947e03bf8a;p=dgit.git diff --git a/tests/lib-gdr b/tests/lib-gdr index 565e0b16..c80dead6 100644 --- a/tests/lib-gdr +++ b/tests/lib-gdr @@ -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' ;;