From 831d4bc106a9b3fb1fd26a44d1f9b75a6066f3b3 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Sat, 19 Dec 2020 13:38:05 +0100 Subject: [PATCH] git-mr-comment-list: allow limit comments by recipients Signed-off-by: Frantisek Hrbata --- git-mr-comment-list | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-mr-comment-list b/git-mr-comment-list index 7d86daa..1855e7f 100755 --- a/git-mr-comment-list +++ b/git-mr-comment-list @@ -47,6 +47,8 @@ parser.add_argument("--before", metavar="DATE", help="Limit the comments output to ones older than a specific date.") parser.add_argument("--author", metavar="PATTERN", action="append", help="Limit the comments output to ones that were created by user matching PATTERN. Can be used multiple times.") +parser.add_argument("--to", metavar="PATTERN", action="append", + help="Limit the comments output to ones that were addressed to user matching PATTERN. Can be used multiple times.") class CFormatter(string.Formatter): def __init__(self): @@ -119,6 +121,10 @@ if args.author: for pattern in args.author: cmd += ["--author", pattern] +if args.to: + for pattern in args.to: + cmd += ["--grep", "^To: .*" + pattern] + if args.extended_regexp: cmd += ["--extended-regexp"] -- 1.7.10.4