7 local gdr=${DGIT_GITDEBREBASE_TEST-git-debrebase}
9 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
10 $gdr $GDR_TEST_OPTS $GDR_TEST_DEBUG $t_gdr_xopts "$@"
11 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
15 t-gdr-branch-structure () {
17 # state should be one of
23 laundered) etype=Upstream ;;
24 stitched) etype=Pseudomerge ;;
25 patches) etype=XXX-TODO ;;
28 t-git-debrebase analyse >../anal.check
29 expect=`git rev-parse HEAD`
31 local cid ctype info nparents
32 while read cid ctype info; do
33 : ===== $cid $ctype $info =====
36 if [ "x$ctype" = "x$etype" ]; then cetype=SAME; fi
37 local parents="`git log -n1 --pretty=format:%P $cid`"
40 : "$ctype/$cetype" "$parents"
41 case "$ctype/$cetype" in
43 expect=${info#Contributor=}
46 git diff --quiet $expect..$cid
51 git diff --quiet $expect..$cid -- ':.' ':!debian'
52 git diff --quiet $expect..$cid -- ':debian/patches'
57 git diff --quiet $expect..$cid -- \
58 ':.' ':!debian/changelog'
62 git diff --quiet $expect..$cid -- ':debian'
64 BreakwaterUpstreamMerge/Upstream| \
65 BreakwaterUpstreamMerge/Packaging)
69 fail "etype=$etype ctype=$ctype cetype=$cetype $cid"
73 local cnparents=`printf "%s" "$parents" | wc -w`
74 test $cnparents = $enparents
78 *) fail 'unexpected parent' ;;