]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
patman: Move -H out of the send command
authorSimon Glass <sjg@chromium.org>
Thu, 8 May 2025 04:30:14 +0000 (06:30 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 27 May 2025 09:07:42 +0000 (10:07 +0100)
This is the help for the whole of patman, so move it to the start of the
control function, rather than being inside 'patman send'.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/cmdline.py
tools/patman/control.py

index 912d488ff74f4a5c1c1ff6a16b915be2089de11e..0ae92f88c4b5c1cd27e09e374d1d91cccaa20f52 100644 (file)
@@ -215,7 +215,7 @@ def parse_args(argv=None, config_fname=None, parser=None):
     # If we have a command, it is safe to parse all arguments
     if args.cmd:
         args = parser.parse_args(argv)
-    else:
+    elif not args.full_help:
         # No command, so insert it after the known arguments and before the ones
         # that presumably relate to the 'send' subcommand
         nargs = len(rest)
index fbf368cb2fa77d7fdbcbd5a5b547b43f1f3bcc20..902b5092e9c5beed9ae5d4bcd442c73d1730c088 100644 (file)
@@ -110,6 +110,15 @@ def patchwork_status(branch, count, start, end, dest_branch, force,
 
 
 def do_patman(args):
+    """Process a patman command
+
+    Args:
+        args (Namespace): Arguments to process
+    """
+    if args.full_help:
+        with resources.path('patman', 'README.rst') as readme:
+            tools.print_full_help(str(readme))
+        return 0
     if args.cmd == 'send':
         # Called from git with a patch filename as argument
         # Printout a list of additional CC recipients for this patch
@@ -123,15 +132,12 @@ def do_patman(args):
                             cca = cca.strip()
                             if cca:
                                 print(cca)
-
-        elif args.full_help:
-            with resources.path('patman', 'README.rst') as readme:
-                tools.print_full_help(str(readme))
         else:
             # If we are not processing tags, no need to warning about bad ones
             if not args.process_tags:
                 args.ignore_bad_tags = True
             do_send(args)
+        return 0
 
     ret_code = 0
     try: