chiark / gitweb /
git-debrebase: forget-was-ever-debrebase: New subcommand
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:31:49 +0000 (21:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 20:31:49 +0000 (21:31 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase
git-debrebase.1.pod

index 5fabfd6..c353111 100755 (executable)
@@ -2838,6 +2838,18 @@ END
        'convert-from-dgit-view';
 }
 
+sub cmd_forget_was_ever_debrebase () {
+    badusage "forget-was-ever-debrebase takes no further arguments" if @ARGV;
+    my ($ffqstatus, $ffq_msg, $current, $ffq_prev, $gdrlast) =
+       ffq_prev_branchinfo();
+    fail "Not suitable for recording git-debrebaseness anyway: $ffq_msg"
+       if defined $ffq_msg;
+    push @deferred_updates, "delete $ffq_prev";
+    push @deferred_updates, "delete $gdrlast";
+    snags_maybe_bail();
+    run_deferred_updates "forget-was-ever-debrebase";
+}
+
 sub cmd_record_resolved_merge () {
     badusage "record-resolved-merge takes no further arguments" if @ARGV;
     # MERGE-TODO needs documentation
index 7ad1ab9..1156825 100644 (file)
@@ -422,6 +422,20 @@ and it should not be necessary.
 
 =back
 
+=item git-debrebase forget-was-ever-debrebase
+
+Deletes the ffq-prev and debrebase-last refs
+associated with this branch,
+that git-debrebase and dgit use to determine
+whether this branch is managed by git-debrebase,
+and what previous head may need to be stitched back in.
+
+This can be useful if you were just playing with git-debrebase,
+and have used git-reset --hard to go back to a commit
+before your experiments.
+
+Do not use this if you expect to run git-debrebase on the branch again.
+
 =back
 
 =head1 OPTIONS