1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 03:36:31 +02:00
git/shortlog.h
Jeff King 47beb37bc6 shortlog: match commit trailers with --group
If a project uses commit trailers, this patch lets you use
shortlog to see who is performing each action. For example,
running:

  git shortlog -ns --group=trailer:reviewed-by

in git.git shows who has reviewed. You can even use a custom
format to see things like who has helped whom:

  git shortlog --format="...helped %an (%ad)" \
               --group=trailer:helped-by

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-09-27 12:21:05 -07:00

39 lines
610 B
C

#ifndef SHORTLOG_H
#define SHORTLOG_H
#include "string-list.h"
struct commit;
struct shortlog {
struct string_list list;
int summary;
int wrap_lines;
int sort_by_number;
int wrap;
int in1;
int in2;
int user_format;
int abbrev;
enum {
SHORTLOG_GROUP_AUTHOR = 0,
SHORTLOG_GROUP_COMMITTER,
SHORTLOG_GROUP_TRAILER,
} group;
char *trailer;
char *common_repo_prefix;
int email;
struct string_list mailmap;
FILE *file;
};
void shortlog_init(struct shortlog *log);
void shortlog_add_commit(struct shortlog *log, struct commit *commit);
void shortlog_output(struct shortlog *log);
#endif