From 8e654910e1b1fcf3afa903d9952539794eef0d1a Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Thu, 28 May 2020 12:00:38 -0400 Subject: Add --no-cover and -o - to output to stdout By request, provide a way to output the results of b4 am to stdout. This way it can be piped straight to "git am". E.g.: b4 diff 20200526205322.23465-1-mic@digikod.net -o - | git am Requested-by: Rob Herring Signed-off-by: Konstantin Ryabitsev --- man/b4.5 | 37 ++++++++++++++++--------------------- man/b4.5.rst | 38 ++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 43 deletions(-) (limited to 'man') diff --git a/man/b4.5 b/man/b4.5 index 9ea05d0..95876b8 100644 --- a/man/b4.5 +++ b/man/b4.5 @@ -86,11 +86,10 @@ msgid Message ID to process, or pipe a raw message show this help message and exit .TP .BI \-o \ OUTDIR\fP,\fB \ \-\-outdir \ OUTDIR -Output into this directory +Output into this directory (or use \- to output mailbox contents to stdout) .TP .BI \-p \ USEPROJECT\fP,\fB \ \-\-use\-project \ USEPROJECT -Use a specific project instead of guessing (linux\-mm, -linux\-hardening, etc) +Use a specific project instead of guessing (linux\-mm, linux\-hardening, etc) .TP .B \-c\fP,\fB \-\-check\-newer\-revisions Check if newer patch revisions exist @@ -99,8 +98,7 @@ Check if newer patch revisions exist Filename to name the mbox file .TP .BI \-m \ LOCALMBOX\fP,\fB \ \-\-use\-local\-mbox \ LOCALMBOX -Instead of grabbing a thread from lore, process this -mbox file +Instead of grabbing a thread from lore, process this mbox file .TP .B \-C\fP,\fB \-\-no\-cache Do not use local cache @@ -124,11 +122,10 @@ msgid Message ID to process, or pipe a raw message show this help message and exit .TP .BI \-o \ OUTDIR\fP,\fB \ \-\-outdir \ OUTDIR -Output into this directory +Output into this directory (or use \- to output mailbox contents to stdout) .TP .BI \-p \ USEPROJECT\fP,\fB \ \-\-use\-project \ USEPROJECT -Use a specific project instead of guessing (linux\-mm, -linux\-hardening, etc) +Use a specific project instead of guessing (linux\-mm, linux\-hardening, etc) .TP .B \-c\fP,\fB \-\-check\-newer\-revisions Check if newer patch revisions exist @@ -137,8 +134,7 @@ Check if newer patch revisions exist Filename to name the mbox file .TP .BI \-m \ LOCALMBOX\fP,\fB \ \-\-use\-local\-mbox \ LOCALMBOX -Instead of grabbing a thread from lore, process this -mbox file +Instead of grabbing a thread from lore, process this mbox file .TP .B \-C\fP,\fB \-\-no\-cache Do not use local cache @@ -165,16 +161,16 @@ Add a lore.kernel.org/r/ link to every patch Save mbox patches in a quilt\-ready folder .TP .BI \-P \ CHERRYPICK\fP,\fB \ \-\-cherry\-pick \ CHERRYPICK -Cherry\-pick a subset of patches (e.g. "\-P 1\-2,4,6\-", -"\-P _" to use just the msgid specified, -or "\-P *globbing*" to match on commit subject) +Cherry\-pick a subset of patches (e.g. "\-P 1\-2,4,6\-", "\-P _" to use just the msgid specified, or "\-P *globbing*" to match on commit subject) .TP .B \-g\fP,\fB \-\-guess\-base Try to guess the base of the series (if not specified) .TP .B \-3\fP,\fB \-\-prep\-3way -Prepare for a 3\-way merge (tries to ensure that all -index blobs exist by making a fake commit range) +Prepare for a 3\-way merge (tries to ensure that all index blobs exist by making a fake commit range) +.TP +.B \-\-no\-cover +Do not save the cover letter (on by default when using \-o \-) .UNINDENT .UNINDENT .sp @@ -198,12 +194,10 @@ show this help message and exit Use a custom From field .TP .B \-n\fP,\fB \-\-no\-submit -Do not submit attestation, just save the message ready -to send +Do not submit attestation, just save the message ready to send .TP .BI \-o \ OUTPUT\fP,\fB \ \-\-output \ OUTPUT -Save attestation message in this file if not -submitting it +Save attestation message in this file if not submitting it .UNINDENT .UNINDENT .sp @@ -236,8 +230,7 @@ Check if pull request has already been applied Convert a pull request into an mbox full of patches .TP .BI \-o \ OUTMBOX\fP,\fB \ \-\-output\-mbox \ OUTMBOX -Save exploded messages into this mailbox (default: -msgid.mbx) +Save exploded messages into this mailbox (default: msgid.mbx) .UNINDENT .UNINDENT .sp @@ -323,6 +316,8 @@ Save diff into this file instead of outputting to stdout .B \-c\fP,\fB \-\-color Force color output even when writing to file .UNINDENT +.IP "System Message: WARNING/2 (b4.5.rst:, line 201)" +Option list ends without a blank line; unexpected unindent. .INDENT 0.0 .TP .B \-m AMBOX AMBOX, \-\-compare\-am\-mboxes AMBOX AMBOX diff --git a/man/b4.5.rst b/man/b4.5.rst index d8e28f6..a27241a 100644 --- a/man/b4.5.rst +++ b/man/b4.5.rst @@ -53,17 +53,15 @@ positional arguments: optional arguments: -h, --help show this help message and exit -o OUTDIR, --outdir OUTDIR - Output into this directory + Output into this directory (or use - to output mailbox contents to stdout) -p USEPROJECT, --use-project USEPROJECT - Use a specific project instead of guessing (linux-mm, - linux-hardening, etc) + Use a specific project instead of guessing (linux-mm, linux-hardening, etc) -c, --check-newer-revisions Check if newer patch revisions exist -n WANTNAME, --mbox-name WANTNAME Filename to name the mbox file -m LOCALMBOX, --use-local-mbox LOCALMBOX - Instead of grabbing a thread from lore, process this - mbox file + Instead of grabbing a thread from lore, process this mbox file -C, --no-cache Do not use local cache *Example*: b4 mbox 20200313231252.64999-1-keescook@chromium.org @@ -79,17 +77,15 @@ positional arguments: optional arguments: -h, --help show this help message and exit -o OUTDIR, --outdir OUTDIR - Output into this directory + Output into this directory (or use - to output mailbox contents to stdout) -p USEPROJECT, --use-project USEPROJECT - Use a specific project instead of guessing (linux-mm, - linux-hardening, etc) + Use a specific project instead of guessing (linux-mm, linux-hardening, etc) -c, --check-newer-revisions Check if newer patch revisions exist -n WANTNAME, --mbox-name WANTNAME Filename to name the mbox file -m LOCALMBOX, --use-local-mbox LOCALMBOX - Instead of grabbing a thread from lore, process this - mbox file + Instead of grabbing a thread from lore, process this mbox file -C, --no-cache Do not use local cache -v WANTVER, --use-version WANTVER Get a specific version of the patch/series @@ -103,14 +99,14 @@ optional arguments: -l, --add-link Add a lore.kernel.org/r/ link to every patch -Q, --quilt-ready Save mbox patches in a quilt-ready folder -P CHERRYPICK, --cherry-pick CHERRYPICK - Cherry-pick a subset of patches (e.g. "-P 1-2,4,6-", - "-P _" to use just the msgid specified, - or "-P \*globbing\*" to match on commit subject) + Cherry-pick a subset of patches (e.g. "-P 1-2,4,6-", "-P _" to use just the msgid specified, or "-P \*globbing\*" to match on commit subject) -g, --guess-base Try to guess the base of the series (if not specified) -3, --prep-3way - Prepare for a 3-way merge (tries to ensure that all - index blobs exist by making a fake commit range) + Prepare for a 3-way merge (tries to ensure that all index blobs exist by making a fake commit range) + --no-cover + Do not save the cover letter (on by default when using -o -) + *Example*: b4 am 20200313231252.64999-1-keescook@chromium.org @@ -126,11 +122,10 @@ optional arguments: -h, --help show this help message and exit -f SENDER, --from SENDER Use a custom From field - -n, --no-submit Do not submit attestation, just save the message ready - to send + -n, --no-submit + Do not submit attestation, just save the message ready to send -o OUTPUT, --output OUTPUT - Save attestation message in this file if not - submitting it + Save attestation message in this file if not submitting it *Example*: b4 attest -n -o output/xxxx-attestation.patch output/\*.patch @@ -151,8 +146,7 @@ optional arguments: -c, --check Check if pull request has already been applied -e, --explode Convert a pull request into an mbox full of patches -o OUTMBOX, --output-mbox OUTMBOX - Save exploded messages into this mailbox (default: - msgid.mbx) + Save exploded messages into this mailbox (default: msgid.mbx) *Example*: b4 pr 202003292120.2BDCB41@keescook @@ -208,7 +202,7 @@ optional arguments: -m AMBOX AMBOX, --compare-am-mboxes AMBOX AMBOX Compare two mbx files prepared with "b4 am" -*Example*: b4 diff +*Example*: b4 diff 20200526205322.23465-1-mic@digikod.net CONFIGURATION ------------- -- cgit v1.2.3