From 8cbb52fe9484b8c50b94a9f97f1965f4d6c4ed34 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Sat, 19 Dec 2020 12:52:05 +0100 Subject: [PATCH] git-mr-comment-list: allow limit comments by date This just adds wrapper around git-log --before and --after options. Signed-off-by: Frantisek Hrbata --- git-mr-comment-list | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git-mr-comment-list b/git-mr-comment-list index b4aa1c8..b672d15 100755 --- a/git-mr-comment-list +++ b/git-mr-comment-list @@ -39,6 +39,10 @@ parser.add_argument("-r", "--read-revs", metavar="FILE", help="Read revs for previously read comments from FILE (default: $HOME/.gimrr/comment.revs).") parser.add_argument("-n", "--new-only", action="store_true", help="List only new comments.") +parser.add_argument("--after", metavar="DATE", + help="Limit the comments output to ones more recent than a specific date.") +parser.add_argument("--before", metavar="DATE", + help="Limit the comments output to ones older than a specific date.") class CFormatter(string.Formatter): def __init__(self): @@ -101,6 +105,12 @@ if args.all_match: if args.regexp_ignore_case: cmd += ["--regexp-ignore-case"] +if args.after: + cmd += ["--after", args.after] + +if args.before: + cmd += ["--before", args.before] + rv, out, err = mrlib.run(cmd, stdin=stdin) c2m = mrlib.comments2mrs(refs, mrs) -- 1.7.10.4