diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-28 12:00:38 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-28 12:03:18 -0400 |
commit | 8e654910e1b1fcf3afa903d9952539794eef0d1a (patch) | |
tree | 32e5957c7d343b11723d793055fad694203f7869 /b4/command.py | |
parent | 53ec526927fb224c4252ef172d248bef7d4b1081 (diff) | |
download | b4-8e654910e1b1fcf3afa903d9952539794eef0d1a.tar.gz |
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 <robh@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |