diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-11-23 12:52:05 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-11-23 12:52:05 -0500 |
commit | 8d70b9869f785d8524b2c4d114f2afcb47b6df56 (patch) | |
tree | 11f6d57a1f660549315f8713b97ef8560702d499 /b4/command.py | |
parent | 8f18e98fc2fbe451195c2b84cdb0c87414399baf (diff) | |
download | b4-8d70b9869f785d8524b2c4d114f2afcb47b6df56.tar.gz |
Add mutt-filter mode
Only works for x-patch-sig style attestation, as doing DKIM attestation
requires that we unignore all headers, which just junks up the view.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/b4/command.py b/b4/command.py index 0393fea..ee865b9 100644 --- a/b4/command.py +++ b/b4/command.py @@ -42,7 +42,13 @@ def cmd_am(cmdargs): def cmd_attest(cmdargs): import b4.attest - b4.attest.attest_patches(cmdargs) + if cmdargs.mutt_filter: + b4.attest.mutt_filter() + elif len(cmdargs.patchfile): + b4.attest.attest_patches(cmdargs) + else: + logger.critical('ERROR: missing patches to attest') + sys.exit(1) def cmd_pr(cmdargs): @@ -118,7 +124,9 @@ def cmd(): help='OBSOLETE: this option does nothing and will be removed') sp_att.add_argument('-o', '--output', default=None, help='OBSOLETE: this option does nothing and will be removed') - sp_att.add_argument('patchfile', nargs='+', help='Patches to attest') + sp_att.add_argument('-m', '--mutt-filter', action='store_true', default=False, + help='Run in mutt filter mode') + sp_att.add_argument('patchfile', nargs='*', help='Patches to attest') sp_att.set_defaults(func=cmd_attest) # b4 pr |