chiark / gitweb /
git-debrebase: Provide and test "conclude"
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Apr 2018 21:28:49 +0000 (22:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 21:40:13 +0000 (22:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase
git-debrebase.1.pod
tests/tests/gdr-subcommands

index 00d2f575a6d29361fdc7ddf397f0e1a9be7348db..636ff765cae06141f024e13b7eed023b6851a32c 100755 (executable)
@@ -1325,6 +1325,19 @@ sub cmd_quick () {
     do_stitch 'quick';
 }
 
     do_stitch 'quick';
 }
 
+sub cmd_conclude () {
+    my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
+    if (!$ffq_prev_commitish) {
+       fail "No ongoing git-debrebase session." unless $opt_noop_ok;
+       return;
+    }
+    my $dangling_head = get_head();
+    
+    badusage "no arguments allowed" if @ARGV;
+    do_launder_head 'launder for git-debrebase quick';
+    do_stitch 'quick';
+}
+
 sub cmd_convert_from_gbp () {
     badusage "needs 1 optional argument, the upstream git rev"
        unless @ARGV<=1;
 sub cmd_convert_from_gbp () {
     badusage "needs 1 optional argument, the upstream git rev"
        unless @ARGV<=1;
index 68447b97afbff27da23943d0219fe39d42a1127d..3e4c69845598fb59e97b0d489bdcb4d33e559004 100644 (file)
@@ -55,6 +55,17 @@ The options for git-rebase must either start with C<-i>,
 or be prececded by C<-->,
 to distinguish them from options for git-debrebase.
 
 or be prececded by C<-->,
 to distinguish them from options for git-debrebase.
 
+=item git-debrebase conclude
+
+Finishes a git-debrebase session,
+tidying up the branch and making it fast forward again.
+
+Specifically: if the branch is unstitched,
+launders and restitches it,
+making a new pseudomerge.
+Otherwise, it is an error,
+unless --noop-ok.
+
 =item git-debrebase quick
 
 Unconditionally launders and restitches the branch,
 =item git-debrebase quick
 
 Unconditionally launders and restitches the branch,
index 623211292ef2c96d9fd4ddc4d43531145565026a..f6d817d88eb3a37b367c411a39ac709e1df113f0 100755 (executable)
@@ -148,7 +148,7 @@ make_check () {
        esac
 }
 
        esac
 }
 
-Ec="F:xxxdunno"
+Ec="F:No ongoing git-debrebase session"
 
 # input state:
 #  stitched?           st'd    st'd    unst'd  unst'd
 
 # input state:
 #  stitched?           st'd    st'd    unst'd  unst'd
@@ -162,7 +162,7 @@ subcmd      ''              Ult     Ull     Vlt     Vl
 subcmd stitch          Ns      Nu      Sltf    Stf
 #subcmd        pre-push        Ns      Nu      Sltf    Stf
 subcmd quick           ns      Sl      Sltf    Sl
 subcmd stitch          Ns      Nu      Sltf    Stf
 #subcmd        pre-push        Ns      Nu      Sltf    Stf
 subcmd quick           ns      Sl      Sltf    Sl
-#subcmd        conclude        "$Ec"   "$Ec"   Sltf    Sl
+subcmd conclude        "$Ec"   "$Ec"   Sltf    Sl
 #subcmd        make-patches    sPft    sPft    uPft    uPft
 #subcmd        dgit-upload-hook Psft   Psft    SPft    SPft
 #
 #subcmd        make-patches    sPft    sPft    uPft    uPft
 #subcmd        dgit-upload-hook Psft   Psft    SPft    SPft
 #