chiark / gitweb /
git-debrebase: test suite: spot any merges which have multiple identical parents
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Feb 2018 12:30:08 +0000 (12:30 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:06:59 +0000 (16:06 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib-gdr

index 565e0b1..9a23cd5 100644 (file)
@@ -106,6 +106,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' ;;