diff mbox series

[1/2] Limit --guess-branch argument to 1 branch

Message ID 20250108231203.1209721-1-robh@kernel.org (mailing list archive)
State Under Review
Headers show
Series [1/2] Limit --guess-branch argument to 1 branch | expand

Commit Message

Rob Herring Jan. 8, 2025, 11:12 p.m. UTC
More than 1 branch argument doesn't work correctly, so restrict it to 1
arg. The help text already implies it is a single branch.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 src/b4/command.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/b4/command.py b/src/b4/command.py
index 5d90b4f52b4f..e31ee052c9cd 100644
--- a/src/b4/command.py
+++ b/src/b4/command.py
@@ -184,7 +184,7 @@  def setup_parser() -> argparse.ArgumentParser:
                        help='Save patches in a quilt-ready folder')
     sp_am.add_argument('-g', '--guess-base', dest='guessbase', action='store_true', default=False,
                        help='Try to guess the base of the series (if not specified)')
-    sp_am.add_argument('-b', '--guess-branch', dest='guessbranch', nargs='+', action='extend', type=str, default=None,
+    sp_am.add_argument('-b', '--guess-branch', dest='guessbranch', nargs=1, action='extend', type=str, default=None,
                        help='When guessing base, restrict to this branch (use with -g)')
     sp_am.add_argument('--guess-lookback', dest='guessdays', type=int, default=21,
                        help='When guessing base, go back this many days from the patch date (default: 2 weeks)')