[PATCH 15/25] patman: Use -c to show patch comments

Simon Glass sjg at chromium.org
Sat May 10 13:05:08 CEST 2025


We chose -C as the flag to enable showing comments because -c was used
in 'patman send' to specify the patch count. Now that the 'send' parser
is separated we don't need to do this and it is OK to use the same flag
in a different subcommand.

We want to have a flag for cover-letter comments, so it makes most sense
to have -C for that and -c for patch comments. Update the latter.

Put this in a function since the new 'series' command will add this flag
too.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/patman/cmdline.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/patman/cmdline.py b/tools/patman/cmdline.py
index 8e10c7bb14f..e34cf126556 100644
--- a/tools/patman/cmdline.py
+++ b/tools/patman/cmdline.py
@@ -111,6 +111,11 @@ def add_send_args(par):
         help='Preserve Change-Id tags in patches to send.')
 
 
+def _add_show_comments(parser):
+    parser.add_argument('-c', '--show-comments', action='store_true',
+                        help='Show comments from each patch')
+
+
 def add_send_subparser(subparsers):
     """Add the 'send' subparser
 
@@ -147,8 +152,7 @@ def add_status_subparser(subparsers):
     """
     status = subparsers.add_parser('status',
                                    help='Check status of patches in patchwork')
-    status.add_argument('-C', '--show-comments', action='store_true',
-                        help='Show comments from each patch')
+    _add_show_comments(status)
     status.add_argument(
         '-d', '--dest-branch', type=str,
         help='Name of branch to create with collected responses')
-- 
2.43.0



More information about the U-Boot mailing list