From: Frantisek Hrbata Date: Sat, 19 Dec 2020 12:38:05 +0000 (+0100) Subject: git-mr-comment-list: allow limit comments by recipients X-Git-Tag: v0.2~20 X-Git-Url: http://www.hrbata.com/gitweb/?a=commitdiff_plain;h=831d4bc106a9b3fb1fd26a44d1f9b75a6066f3b3;p=gimrr.git git-mr-comment-list: allow limit comments by recipients Signed-off-by: Frantisek Hrbata --- 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"]