From e66c2cf3f7182a3e6f52945636a807ed4a959d5b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 19 Aug 2018 18:41:40 +0100 Subject: git-debrebase: `prepush' is now a silent no-op if unstitched. This is more friendly. Update the docs accordingly. Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ git-debrebase | 5 ++++- git-debrebase.1.pod | 12 +++++++++--- tests/tests/gdr-subcommands | 2 +- 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=] +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 instead, +because that launders the branch too. + =item git-debrebase stitch [--prose=] 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 instead, -because that launders the branch too. +You should consider using B or B 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 -- cgit v1.2.3