From: Frantisek Hrbata Date: Sat, 19 Dec 2020 11:52:05 +0000 (+0100) Subject: git-mr-comment-list: allow limit comments by date X-Git-Tag: v0.2~23 X-Git-Url: http://www.hrbata.com/gitweb/?a=commitdiff_plain;h=8cbb52fe9484b8c50b94a9f97f1965f4d6c4ed34;p=gimrr.git 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 --- 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)