chiark / gitweb /
test suite: build-modes-*: Provide stunt dpkg-deb to pass -Znone
[dgit.git] / tests / tests / gdr-subcommands
index b739fd77c954348f3efea8623af16a3fbf4546f4..672ddc988511599250ad15768287bd5b55d2dba3 100755 (executable)
@@ -25,6 +25,11 @@ mix-it () {
        t-git-next-date
 }
 
+git checkout -b raw-converted-from-gbp converted-from-gbp
+test "$(git diff --stat HEAD^2)"
+git diff --exit-code --stat HEAD^1
+git reset --hard HEAD^1
+
 git checkout -b stitched-laundered master
 mix-it
 t-git-debrebase quick
@@ -51,7 +56,8 @@ git show-ref
 subcmd () {
        local subcmd=$1
        shift
-       for startbranch in {stitched,unstitched}-{laundered,mixed}; do
+       for startbranch in {stitched,unstitched}-{laundered,mixed} \
+                       raw-converted-from-gbp; do
                work="work-$subcmd-$startbranch"
 
                : "---------- $subcmd $startbranch ----------"
@@ -162,6 +168,7 @@ make_check () {
        P*)
                t-dgit -wgf --quilt=nofix quilt-fixup
                git diff HEAD~ debian/patches | egrep .
+               t-gdr-made-patches
                git diff --quiet HEAD~ -- ':.' ':!debian/patches'
                git reset --hard HEAD~
                ;;
@@ -169,6 +176,11 @@ make_check () {
                git diff --quiet HEAD refs/heads/$before -- ':.' ':!debian/patches'
                t-gdr-good laundered
                ;;
+       A*)
+               t-refs-notexist \
+                       refs/ffq-prev/heads/$work \
+                       refs/debrebase-last/heads/$work
+               ;;
        t*)
                git diff --quiet HEAD refs/heads/$before
                ;;
@@ -191,20 +203,21 @@ Ec="F:No ongoing git-debrebase session"
 Ep="F:Patch export produced patch amendments"
 
 # input state:
-#  stitched?           st'd    st'd    unst'd  unst'd
-#  laundered?          laund'd mixed   laund'd mixed
+#  stitched?           st'd    st'd    unst'd  unst'd  convert
+#  laundered?          laund'd mixed   laund'd mixed   -from-gbp
 #
 # "mixed" means an out of order branch
 # containing mixed commits and patch additions,
 # but which needs even more patches
 #
-subcmd ''              Ult     Ull     Vlt     Vl
-subcmd stitch          Ns      Nu      Sltf    Stf
-subcmd prepush         ns      nu      Sltf    Stf
-subcmd quick           ns      Sl      Sltf    Sl
-subcmd conclude        "$Ec"   "$Ec"   Sltf    Sl
-subcmd scrap           Ns      Ns      Z       Z
-subcmd make-patches    sPft    "$Ep"   uPft    "$Ep"
+subcmd ''              Ult     Ull     Vlt     Vl      nU
+subcmd stitch          Ns      Nu      Sltf    Stf     Ns
+subcmd prepush         ns      nu      Sltf    Stf     ns
+subcmd quick           ns      Sl      Sltf    Sl      n
+subcmd conclude        "$Ec"   "$Ec"   Sltf    Sl      N
+subcmd scrap           Ns      Ns      Z       Z       N
+subcmd make-patches    sPft    "$Ep"   uPft    "$Ep"   Pn
+subcmd  forget-was-ever-debrebase nA nA        nA      nA      nA
 #
 # result codes, each one is a check:
 #   E:$pat     } this is an error (must come first)
@@ -224,6 +237,7 @@ subcmd      make-patches    sPft    "$Ep"   uPft    "$Ep"
 #   s          result is stitched, debrebase-last exists and is unchanged
 #   S          result is stitch just made, remaining letters apply to result~
 #   Z          result is rewind to before changes made
+#   A          no ffq-prev or debrebase-last refs ("Amnesia")
 #
 #   P          result is add-patches, remaining letters apply to result~
 #