From 5e9931c213685938c79d855856a16ff9131772d5 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 --- b4/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'b4/command.py') diff --git a/b4/command.py b/b4/command.py index d0d084e..ffa58ef 100644 --- a/b4/command.py +++ b/b4/command.py @@ -17,7 +17,7 @@ def cmd_mbox_common_opts(sp): sp.add_argument('msgid', nargs='?', help='Message ID to process, or pipe a raw message') sp.add_argument('-o', '--outdir', default='.', - help='Output into this directory') + help='Output into this directory (or use - to output mailbox contents to stdout)') sp.add_argument('-p', '--use-project', dest='useproject', default=None, help='Use a specific project instead of guessing (linux-mm, linux-hardening, etc)') sp.add_argument('-c', '--check-newer-revisions', dest='checknewer', action='store_true', default=False, @@ -111,6 +111,8 @@ def cmd(): sp_am.add_argument('-3', '--prep-3way', dest='threeway', action='store_true', default=False, help='Prepare for a 3-way merge ' '(tries to ensure that all index blobs exist by making a fake commit range)') + sp_am.add_argument('--no-cover', dest='nocover', action='store_true', default=False, + help='Do not save the cover letter (on by default when using -o -)') sp_am.set_defaults(func=cmd_am) # b4 attest -- cgit v1.2.3