diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-06-16 16:22:55 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2022-06-16 16:22:55 -0400 |
commit | 797fc250c7dd64550f2283bdc749eda7555e3fa3 (patch) | |
tree | 24293cea445b68bd4a03e7906ff649a7f7c63781 /b4/command.py | |
parent | 70bf7e4c8563576241e15fcea9380d491d7e5cd7 (diff) | |
download | b4-797fc250c7dd64550f2283bdc749eda7555e3fa3.tar.gz |
Implement "b4 shazam -M" that execs git-merge
In addition to just being able to fetch a series into FETCH_HEAD, also
add an option to exec git-merge automatically so that people don't have
to cut-and-paste the merge command to use with paths to the cover
letter.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/b4/command.py b/b4/command.py index aa307da..4f69231 100644 --- a/b4/command.py +++ b/b4/command.py @@ -152,15 +152,18 @@ def cmd(): sp_sh = subparsers.add_parser('shazam', help='Like b4 am, but applies the series to your tree') cmd_retrieval_common_opts(sp_sh) cmd_am_common_opts(sp_sh) - sp_sh.add_argument('-H', '--make-fetch-head', dest='makefetchhead', action='store_true', default=False, - help='Attempt to treat series as a pull request and fetch it into FETCH_HEAD') + sh_g = sp_sh.add_mutually_exclusive_group() + sh_g.add_argument('-H', '--make-fetch-head', dest='makefetchhead', action='store_true', default=False, + help='Attempt to treat series as a pull request and fetch it into FETCH_HEAD') + sh_g.add_argument('-M', '--merge', dest='merge', action='store_true', default=False, + help='Attempt to merge series as if it were a pull request (execs git-merge)') sp_sh.add_argument('--guess-lookback', dest='guessdays', type=int, default=21, - help=('(use with -H) When guessing base, go back this many days from the patch date ' + help=('(use with -H or -M) When guessing base, go back this many days from the patch date ' '(default: 3 weeks)')) sp_sh.set_defaults(func=cmd_shazam) # b4 attest - sp_att = subparsers.add_parser('attest', help='Create cryptographic attestation for a set of patches') + sp_att = subparsers.add_parser('attest', help='(DEPRECATED) Create cryptographic attestation for a set of patches') sp_att.add_argument('-f', '--from', dest='sender', default=None, help='OBSOLETE: this option does nothing and will be removed') sp_att.add_argument('-n', '--no-submit', dest='nosubmit', action='store_true', default=False, |