From 251554c26931bec94e86d0e5740084d6116dd263 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 24 Oct 2022 14:55:30 -0400 Subject: shortlog: accept `--date`-related options Prepare for a future patch which will introduce arbitrary pretty formats via the `--group` argument. To allow additional customizability (for example, to support something like `git shortlog -s --group='%aD' --date='format:%Y-%m' ...` (which groups commits by the datestring 'YYYY-mm' according to author date), we must store off the `--date` parsed from calling `parse_revision_opt()`. Note that this also affects custom output `--format` strings in `git shortlog`. Though this is a behavior change, this is arguably fixing a long-standing bug (ie., that `--format` strings are not affected by `--date` specifiers as they should be). Signed-off-by: Jeff King Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano --- shortlog.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shortlog.h') diff --git a/shortlog.h b/shortlog.h index 3f7e9aabca..dc388dd459 100644 --- a/shortlog.h +++ b/shortlog.h @@ -2,6 +2,7 @@ #define SHORTLOG_H #include "string-list.h" +#include "date.h" struct commit; @@ -15,6 +16,7 @@ struct shortlog { int in2; int user_format; int abbrev; + struct date_mode date_mode; enum { SHORTLOG_GROUP_AUTHOR = (1 << 0), -- cgit v1.2.1