blob: 28d04f951af73d8f9bdf58f6100a5eb3fe51b72c [file] [log] [blame]
Daniel Barkalow552bcac2008-02-25 18:24:14 -05001#ifndef SHORTLOG_H
2#define SHORTLOG_H
3
Johannes Schindelinc455c872008-07-21 19:03:49 +01004#include "string-list.h"
Jeff King251554c2022-10-24 14:55:30 -04005#include "date.h"
Daniel Barkalow552bcac2008-02-25 18:24:14 -05006
Elijah Newrenef3ca952018-08-15 10:54:05 -07007struct commit;
8
Daniel Barkalow552bcac2008-02-25 18:24:14 -05009struct shortlog {
Johannes Schindelinc455c872008-07-21 19:03:49 +010010 struct string_list list;
Daniel Barkalow552bcac2008-02-25 18:24:14 -050011 int summary;
12 int wrap_lines;
13 int sort_by_number;
14 int wrap;
15 int in1;
16 int in2;
Johannes Schindelinb526f8e2008-07-14 19:08:52 +010017 int user_format;
Will Palmerc1977022010-05-03 22:18:57 -050018 int abbrev;
Jeff King251554c2022-10-24 14:55:30 -040019 struct date_mode date_mode;
Jeff King92338c42020-09-27 04:39:59 -040020
21 enum {
Jeff King63d24fa2020-09-27 04:40:15 -040022 SHORTLOG_GROUP_AUTHOR = (1 << 0),
23 SHORTLOG_GROUP_COMMITTER = (1 << 1),
24 SHORTLOG_GROUP_TRAILER = (1 << 2),
Taylor Blau3dc95e02022-10-24 14:55:39 -040025 SHORTLOG_GROUP_FORMAT = (1 << 3),
Jeff King63d24fa2020-09-27 04:40:15 -040026 } groups;
27 struct string_list trailers;
Taylor Blau3dc95e02022-10-24 14:55:39 -040028 struct string_list format;
Daniel Barkalow552bcac2008-02-25 18:24:14 -050029
Daniel Barkalow552bcac2008-02-25 18:24:14 -050030 int email;
Johannes Schindelinc455c872008-07-21 19:03:49 +010031 struct string_list mailmap;
Johannes Schindelin0a7b3572016-06-22 17:01:49 +020032 FILE *file;
Daniel Barkalow552bcac2008-02-25 18:24:14 -050033};
34
35void shortlog_init(struct shortlog *log);
Taylor Blau10538e22022-10-24 14:55:41 -040036void shortlog_finish_setup(struct shortlog *log);
Daniel Barkalow552bcac2008-02-25 18:24:14 -050037
38void shortlog_add_commit(struct shortlog *log, struct commit *commit);
39
40void shortlog_output(struct shortlog *log);
41
42#endif