diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Apply the mailmap at HEAD to every ident
Diffstat (limited to 'source/cgit.c')
-rw-r--r--source/cgit.c6
1 file changed, 6 insertions, 0 deletions
diff --git a/source/cgit.c b/source/cgit.c
index ae91dd2..36f3b25 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -107,6 +107,7 @@ static void prepare_context(void)
ctx.cfg.local_time = 0;
ctx.cfg.date_mode = date_mode_from_type(DATE_SHORT);
ctx.cfg.enable_header = 1;
+ ctx.cfg.enable_mailmap = 1;
ctx.cfg.enable_plain_email = 1;
ctx.cfg.enable_relative_dates = 1;
ctx.cfg.enable_http_clone = 1;
@@ -239,6 +240,7 @@ static void print_repo(FILE *f, struct cgit_repo *repo)
fprintf(f, "repo.enable-gitmodules-links=%d\n", repo->enable_gitmodules_links);
fprintf(f, "repo.enable-log-filecount=%d\n", repo->enable_log_filecount);
fprintf(f, "repo.enable-log-linecount=%d\n", repo->enable_log_linecount);
+ fprintf(f, "repo.enable-mailmap=%d\n", repo->enable_mailmap);
if (repo->about_filter && repo->about_filter != ctx.cfg.about_filter)
cgit_fprintf_filter(repo->about_filter, f, "repo.about-filter=");
if (repo->commit_filter && repo->commit_filter != ctx.cfg.commit_filter)
@@ -557,6 +559,8 @@ static void apply_config(const char *name, const char *value)
ctx.cfg.enable_log_filecount = atoi(value);
else if (!strcmp(name, "enable-log-linecount"))
ctx.cfg.enable_log_linecount = atoi(value);
+ else if (!strcmp(name, "enable-mailmap"))
+ ctx.cfg.enable_mailmap = atoi(value);
else if (!strcmp(name, "enable-relative-dates"))
ctx.cfg.enable_relative_dates = atoi(value);
else if (!strcmp(name, "enable-remote-branches"))
@@ -1168,6 +1172,8 @@ void cgit_repo_config(struct cgit_repo *repo, const char *name, const char *valu
repo->enable_log_filecount = atoi(value);
else if (!strcmp(name, "enable-log-linecount"))
repo->enable_log_linecount = atoi(value);
+ else if (!strcmp(name, "enable-mailmap"))
+ repo->enable_mailmap = atoi(value);
else if (!strcmp(name, "enable-remote-branches"))
repo->enable_remote_branches = atoi(value);
else if (!strcmp(name, "enable-subject-links"))