summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-19 18:41:40 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-19 18:50:34 +0100
commite66c2cf3f7182a3e6f52945636a807ed4a959d5b (patch)
tree4f07998cf94817851dba90e7004915ca52dc5ab4
parent76b47400a06d576939c8b010cdec1c506714e780 (diff)
git-debrebase: `prepush' is now a silent no-op if unstitched.
This is more friendly. Update the docs accordingly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--debian/changelog2
-rwxr-xr-xgit-debrebase5
-rw-r--r--git-debrebase.1.pod12
-rwxr-xr-xtests/tests/gdr-subcommands2
4 files changed, 16 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index e9a36a2..9ec8a6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ dgit (6.7~) unstable; urgency=medium
* test suite: unset GIT_EDITOR, so it works if user has that set.
* git-debrebase: Improve laundry performance by a factor of ~55:1,
and analysis performance by factor of ~4.2:1. Closes:#905995.
+ * git-debrebase: `prepush' is now a silent no-op if the branch is
+ unstitched. This is more friendly.
--
diff --git a/git-debrebase b/git-debrebase
index 61507ea..c273976 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -2275,7 +2275,10 @@ sub cmd_stitch () {
badusage "no arguments allowed" if @ARGV;
do_stitch $prose, 0;
}
-sub cmd_prepush () { cmd_stitch(); }
+sub cmd_prepush () {
+ $opt_noop_ok = 1;
+ cmd_stitch();
+}
sub cmd_quick () {
badusage "no arguments allowed" if @ARGV;
diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod
index fe65674..ca81c19 100644
--- a/git-debrebase.1.pod
+++ b/git-debrebase.1.pod
@@ -95,16 +95,22 @@ If the branch is already laundered and stitched, does nothing.
=item git-debrebase prepush [--prose=<for commit message>]
+If the branch is unstitched,
+stitches it,
+consuming ffq-prev.
+
+This is a good command to run before pushing to a git server.
+You should consider using B<conclude> instead,
+because that launders the branch too.
+
=item git-debrebase stitch [--prose=<for commit message>]
Stitches the branch,
consuming ffq-prev.
-This is a good command to run before pushing to a git server.
If there is no ffq-prev, it is an error, unless --noop-ok.
-You should consider using B<conclude> instead,
-because that launders the branch too.
+You should consider using B<prepush> or B<conclude> instead.
=item git-debrebase scrap
diff --git a/tests/tests/gdr-subcommands b/tests/tests/gdr-subcommands
index b4d8f44..e94f83e 100755
--- a/tests/tests/gdr-subcommands
+++ b/tests/tests/gdr-subcommands
@@ -200,7 +200,7 @@ Ep="F:Patch export produced patch amendments"
#
subcmd '' Ult Ull Vlt Vl
subcmd stitch Ns Nu Sltf Stf
-subcmd prepush 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