chiark / gitweb /
test suite: gdr-subcommands: Test scrap
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:06:03 +0000 (14:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:06:03 +0000 (14:06 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/tests/gdr-subcommands

index 0b07372..c48fb5d 100755 (executable)
@@ -35,10 +35,12 @@ mix-it
 
 git checkout -b unstitched-laundered master
 mix-it
+git branch before-unstitch/unstitched-laundered
 t-git-debrebase
 t-gdr-good laundered
 
 git checkout -b unstitched-mixed master
+git branch before-unstitch/unstitched-mixed
 t-git-debrebase
 mix-it
 
@@ -173,6 +175,12 @@ make_check () {
        f*)
                t-has-ancestor HEAD refs/heads/$before
                ;;
+       Z*)
+               t-refs-same-start
+               t-refs-same refs/heads/$work
+               t-refs-same refs/heads/before-unstitch/$startbranch
+               t-ref-head
+               ;;
        *)
                fail "$1"
                ;;
@@ -195,6 +203,7 @@ 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        dgit-upload-hook Psft   "$Ep"   SPft    "$Ep"
 #
@@ -215,6 +224,7 @@ subcmd      make-patches    sPft    "$Ep"   uPft    "$Ep"
 #   V          ffq-prev remains unchanged; implies also u
 #   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
 #
 #   P          result is add-patches, remaining letters apply to result~
 #