@@ -206,6 +206,8 @@ def setup_parser() -> argparse.ArgumentParser:
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('-b', '--guess-branch', dest='guessbranch', nargs=1, action='extend', type=str, default=None,
+ help='(use with -H or -M) When guessing base, restrict to this branch (use with -g)')
sp_sh.add_argument('--guess-lookback', dest='guessdays', type=int, default=21,
help=('(use with -H or -M) When guessing base, go back this many days from the patch date '
'(default: 3 weeks)'))
@@ -783,13 +783,13 @@ def main(cmdargs: argparse.Namespace) -> None:
cmdargs.threeway = False
cmdargs.nopartialreroll = False
cmdargs.outdir = '-'
- cmdargs.guessbranch = None
if cmdargs.merge:
cmdargs.makefetchhead = True
if cmdargs.makefetchhead:
cmdargs.guessbase = True
else:
cmdargs.guessbase = False
+ cmdargs.guessbranch = None
else:
cmdargs.mergebase = False
For the b4 shazam cases which create a FETCH_HEAD, it's useful to be able to specify the branch to use for guessing the base commit rather than just using HEAD. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> --- src/b4/command.py | 2 ++ src/b4/mbox.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)