From: Ian Jackson Date: Sat, 16 Jun 2018 20:27:36 +0000 (+0100) Subject: git-debrebase: make-patched: Provide --quiet-would-amend X-Git-Tag: archive/debian/5.0~26 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ca261d36408442d8f3beeac12434af95810b1e32 git-debrebase: make-patched: Provide --quiet-would-amend Signed-off-by: Ian Jackson --- diff --git a/git-debrebase b/git-debrebase index 111bb1f7..e5cafd1c 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1505,6 +1505,9 @@ sub make_patches ($) { } sub cmd_make_patches () { + my $opt_quiet_would_amend; + GetOptions('quiet-would-amend!', \$opt_quiet_would_amend) + or die badusage("bad options to make-patches"); badusage "no arguments allowed" if @ARGV; my $old_head = get_head(); my $new = make_patches $old_head; @@ -1519,7 +1522,8 @@ sub cmd_make_patches () { print STDERR failmsg "Patch export produced patch amendments". " (abandoned output commit $new).". - " Try laundering first."; + " Try laundering first." + unless $opt_quiet_would_amend; finish 7; } } diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod index 27b5c933..4d4c85a9 100644 --- a/git-debrebase.1.pod +++ b/git-debrebase.1.pod @@ -201,7 +201,7 @@ that its command line syntax is optimal. We may want to introduce an incompatible replacement syntax under the name C. -=item git-debrebase make-patches +=item git-debrebase make-patches [--quiet-would-amend] Generate patches in debian/patches/ representing the changes made to upstream files. @@ -222,6 +222,12 @@ and all that has happened is that more changes to upstream files have been committed, running it again can add the missing patches. +If the patches implied by the current branch +are not a simple superset of those already in debian/patches, +make-patches will fail with exit status 7, +and an error message. +(The message can be suppress with --quiet-would-amend.) + =item git-debrebase convert-from-gbp [] Cnnverts a gbp patches-unapplied branch