author | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 13:01:59 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2011-02-19 13:01:59 (UTC) |
commit | 31e1f9af1d46bd7dfdb3b2ac580c0d0cc8dbaa63 (patch) (unidiff) | |
tree | 26200ad3c376ea1208d2a870ebb3b2bc6d7abee6 /cgit.c | |
parent | e66a16cebcdac53b63e77876acef1ca9e4877038 (diff) | |
parent | c2bfd40f8aaaa69a66c6eb729c202e42a43ec166 (diff) | |
download | cgit-31e1f9af1d46bd7dfdb3b2ac580c0d0cc8dbaa63.zip cgit-31e1f9af1d46bd7dfdb3b2ac580c0d0cc8dbaa63.tar.gz cgit-31e1f9af1d46bd7dfdb3b2ac580c0d0cc8dbaa63.tar.bz2 |
Merge branch 'jh/graph'
* jh/graph:
ui-log: Move 'Age' column when commit graph is present
ui-log: Line-wrap long commit subjects when showmsg is enabled
ui-log: Colorize commit graph
ui-log: Implement support for commit graphs
ui-log: Change display of full commit messages (and notes)
Conflicts:
cgit.css
-rw-r--r-- | cgit.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -48,24 +48,26 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
48 | if (!strcmp(name, "name")) | 48 | if (!strcmp(name, "name")) |
49 | repo->name = xstrdup(value); | 49 | repo->name = xstrdup(value); |
50 | else if (!strcmp(name, "clone-url")) | 50 | else if (!strcmp(name, "clone-url")) |
51 | repo->clone_url = xstrdup(value); | 51 | repo->clone_url = xstrdup(value); |
52 | else if (!strcmp(name, "desc")) | 52 | else if (!strcmp(name, "desc")) |
53 | repo->desc = xstrdup(value); | 53 | repo->desc = xstrdup(value); |
54 | else if (!strcmp(name, "owner")) | 54 | else if (!strcmp(name, "owner")) |
55 | repo->owner = xstrdup(value); | 55 | repo->owner = xstrdup(value); |
56 | else if (!strcmp(name, "defbranch")) | 56 | else if (!strcmp(name, "defbranch")) |
57 | repo->defbranch = xstrdup(value); | 57 | repo->defbranch = xstrdup(value); |
58 | else if (!strcmp(name, "snapshots")) | 58 | else if (!strcmp(name, "snapshots")) |
59 | repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); | 59 | repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); |
60 | else if (!strcmp(name, "enable-commit-graph")) | ||
61 | repo->enable_commit_graph = ctx.cfg.enable_commit_graph * atoi(value); | ||
60 | else if (!strcmp(name, "enable-log-filecount")) | 62 | else if (!strcmp(name, "enable-log-filecount")) |
61 | repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value); | 63 | repo->enable_log_filecount = ctx.cfg.enable_log_filecount * atoi(value); |
62 | else if (!strcmp(name, "enable-log-linecount")) | 64 | else if (!strcmp(name, "enable-log-linecount")) |
63 | repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); | 65 | repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); |
64 | else if (!strcmp(name, "enable-remote-branches")) | 66 | else if (!strcmp(name, "enable-remote-branches")) |
65 | repo->enable_remote_branches = atoi(value); | 67 | repo->enable_remote_branches = atoi(value); |
66 | else if (!strcmp(name, "enable-subject-links")) | 68 | else if (!strcmp(name, "enable-subject-links")) |
67 | repo->enable_subject_links = atoi(value); | 69 | repo->enable_subject_links = atoi(value); |
68 | else if (!strcmp(name, "max-stats")) | 70 | else if (!strcmp(name, "max-stats")) |
69 | repo->max_stats = cgit_find_stats_period(value, NULL); | 71 | repo->max_stats = cgit_find_stats_period(value, NULL); |
70 | else if (!strcmp(name, "module-link")) | 72 | else if (!strcmp(name, "module-link")) |
71 | repo->module_link= xstrdup(value); | 73 | repo->module_link= xstrdup(value); |
@@ -132,24 +134,26 @@ void config_cb(const char *name, const char *value) | |||
132 | else if (!strcmp(name, "noplainemail")) | 134 | else if (!strcmp(name, "noplainemail")) |
133 | ctx.cfg.noplainemail = atoi(value); | 135 | ctx.cfg.noplainemail = atoi(value); |
134 | else if (!strcmp(name, "noheader")) | 136 | else if (!strcmp(name, "noheader")) |
135 | ctx.cfg.noheader = atoi(value); | 137 | ctx.cfg.noheader = atoi(value); |
136 | else if (!strcmp(name, "snapshots")) | 138 | else if (!strcmp(name, "snapshots")) |
137 | ctx.cfg.snapshots = cgit_parse_snapshots_mask(value); | 139 | ctx.cfg.snapshots = cgit_parse_snapshots_mask(value); |
138 | else if (!strcmp(name, "enable-filter-overrides")) | 140 | else if (!strcmp(name, "enable-filter-overrides")) |
139 | ctx.cfg.enable_filter_overrides = atoi(value); | 141 | ctx.cfg.enable_filter_overrides = atoi(value); |
140 | else if (!strcmp(name, "enable-gitweb-owner")) | 142 | else if (!strcmp(name, "enable-gitweb-owner")) |
141 | ctx.cfg.enable_gitweb_owner = atoi(value); | 143 | ctx.cfg.enable_gitweb_owner = atoi(value); |
142 | else if (!strcmp(name, "enable-index-links")) | 144 | else if (!strcmp(name, "enable-index-links")) |
143 | ctx.cfg.enable_index_links = atoi(value); | 145 | ctx.cfg.enable_index_links = atoi(value); |
146 | else if (!strcmp(name, "enable-commit-graph")) | ||
147 | ctx.cfg.enable_commit_graph = atoi(value); | ||
144 | else if (!strcmp(name, "enable-log-filecount")) | 148 | else if (!strcmp(name, "enable-log-filecount")) |
145 | ctx.cfg.enable_log_filecount = atoi(value); | 149 | ctx.cfg.enable_log_filecount = atoi(value); |
146 | else if (!strcmp(name, "enable-log-linecount")) | 150 | else if (!strcmp(name, "enable-log-linecount")) |
147 | ctx.cfg.enable_log_linecount = atoi(value); | 151 | ctx.cfg.enable_log_linecount = atoi(value); |
148 | else if (!strcmp(name, "enable-remote-branches")) | 152 | else if (!strcmp(name, "enable-remote-branches")) |
149 | ctx.cfg.enable_remote_branches = atoi(value); | 153 | ctx.cfg.enable_remote_branches = atoi(value); |
150 | else if (!strcmp(name, "enable-subject-links")) | 154 | else if (!strcmp(name, "enable-subject-links")) |
151 | ctx.cfg.enable_subject_links = atoi(value); | 155 | ctx.cfg.enable_subject_links = atoi(value); |
152 | else if (!strcmp(name, "enable-tree-linenumbers")) | 156 | else if (!strcmp(name, "enable-tree-linenumbers")) |
153 | ctx.cfg.enable_tree_linenumbers = atoi(value); | 157 | ctx.cfg.enable_tree_linenumbers = atoi(value); |
154 | else if (!strcmp(name, "max-stats")) | 158 | else if (!strcmp(name, "max-stats")) |
155 | ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); | 159 | ctx.cfg.max_stats = cgit_find_stats_period(value, NULL); |
@@ -531,24 +535,26 @@ void print_repo(FILE *f, struct cgit_repo *repo) | |||
531 | free(tmp); | 535 | free(tmp); |
532 | } | 536 | } |
533 | if (repo->readme) | 537 | if (repo->readme) |
534 | fprintf(f, "repo.readme=%s\n", repo->readme); | 538 | fprintf(f, "repo.readme=%s\n", repo->readme); |
535 | if (repo->defbranch) | 539 | if (repo->defbranch) |
536 | fprintf(f, "repo.defbranch=%s\n", repo->defbranch); | 540 | fprintf(f, "repo.defbranch=%s\n", repo->defbranch); |
537 | if (repo->module_link) | 541 | if (repo->module_link) |
538 | fprintf(f, "repo.module-link=%s\n", repo->module_link); | 542 | fprintf(f, "repo.module-link=%s\n", repo->module_link); |
539 | if (repo->section) | 543 | if (repo->section) |
540 | fprintf(f, "repo.section=%s\n", repo->section); | 544 | fprintf(f, "repo.section=%s\n", repo->section); |
541 | if (repo->clone_url) | 545 | if (repo->clone_url) |
542 | fprintf(f, "repo.clone-url=%s\n", repo->clone_url); | 546 | fprintf(f, "repo.clone-url=%s\n", repo->clone_url); |
547 | fprintf(f, "repo.enable-commit-graph=%d\n", | ||
548 | repo->enable_commit_graph); | ||
543 | fprintf(f, "repo.enable-log-filecount=%d\n", | 549 | fprintf(f, "repo.enable-log-filecount=%d\n", |
544 | repo->enable_log_filecount); | 550 | repo->enable_log_filecount); |
545 | fprintf(f, "repo.enable-log-linecount=%d\n", | 551 | fprintf(f, "repo.enable-log-linecount=%d\n", |
546 | repo->enable_log_linecount); | 552 | repo->enable_log_linecount); |
547 | if (repo->about_filter && repo->about_filter != ctx.cfg.about_filter) | 553 | if (repo->about_filter && repo->about_filter != ctx.cfg.about_filter) |
548 | fprintf(f, "repo.about-filter=%s\n", repo->about_filter->cmd); | 554 | fprintf(f, "repo.about-filter=%s\n", repo->about_filter->cmd); |
549 | if (repo->commit_filter && repo->commit_filter != ctx.cfg.commit_filter) | 555 | if (repo->commit_filter && repo->commit_filter != ctx.cfg.commit_filter) |
550 | fprintf(f, "repo.commit-filter=%s\n", repo->commit_filter->cmd); | 556 | fprintf(f, "repo.commit-filter=%s\n", repo->commit_filter->cmd); |
551 | if (repo->source_filter && repo->source_filter != ctx.cfg.source_filter) | 557 | if (repo->source_filter && repo->source_filter != ctx.cfg.source_filter) |
552 | fprintf(f, "repo.source-filter=%s\n", repo->source_filter->cmd); | 558 | fprintf(f, "repo.source-filter=%s\n", repo->source_filter->cmd); |
553 | if (repo->snapshots != ctx.cfg.snapshots) { | 559 | if (repo->snapshots != ctx.cfg.snapshots) { |
554 | char *tmp = build_snapshot_setting(repo->snapshots); | 560 | char *tmp = build_snapshot_setting(repo->snapshots); |