author | Lars Hjemli <hjemli@gmail.com> | 2007-05-20 20:13:17 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-20 20:13:17 (UTC) |
commit | 271ac5a7e6b5b67f54fdd16e8542aa282f1c7140 (patch) (unidiff) | |
tree | d93a0bce06fca8db57ed1a98aa5e2e45199af845 /shared.c | |
parent | dc3ac3f76077c5d612d42e8beb4878e43acfc58a (diff) | |
parent | 7b39144a541ab5be8bcd2748a5be89389bee7192 (diff) | |
download | cgit-271ac5a7e6b5b67f54fdd16e8542aa282f1c7140.zip cgit-271ac5a7e6b5b67f54fdd16e8542aa282f1c7140.tar.gz cgit-271ac5a7e6b5b67f54fdd16e8542aa282f1c7140.tar.bz2 |
Merge branch 'repogroups'
* repogroups:
Adjust apperance of repogroup headers
Don't highlight repogroup headings
Teach cgit how to group repositories by category
-rw-r--r-- | shared.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -12,24 +12,25 @@ struct repolist cgit_repolist; | |||
12 | struct repoinfo *cgit_repo; | 12 | struct repoinfo *cgit_repo; |
13 | int cgit_cmd; | 13 | int cgit_cmd; |
14 | 14 | ||
15 | char *cgit_root_title = "Git repository browser"; | 15 | char *cgit_root_title = "Git repository browser"; |
16 | char *cgit_css = "/cgit.css"; | 16 | char *cgit_css = "/cgit.css"; |
17 | char *cgit_logo = "/git-logo.png"; | 17 | char *cgit_logo = "/git-logo.png"; |
18 | char *cgit_index_header = NULL; | 18 | char *cgit_index_header = NULL; |
19 | char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/"; | 19 | char *cgit_logo_link = "http://www.kernel.org/pub/software/scm/git/docs/"; |
20 | char *cgit_module_link = "./?repo=%s&page=commit&id=%s"; | 20 | char *cgit_module_link = "./?repo=%s&page=commit&id=%s"; |
21 | char *cgit_virtual_root = NULL; | 21 | char *cgit_virtual_root = NULL; |
22 | char *cgit_script_name = CGIT_SCRIPT_NAME; | 22 | char *cgit_script_name = CGIT_SCRIPT_NAME; |
23 | char *cgit_cache_root = "/var/cache/cgit"; | 23 | char *cgit_cache_root = "/var/cache/cgit"; |
24 | char *cgit_repo_group = NULL; | ||
24 | 25 | ||
25 | int cgit_nocache = 0; | 26 | int cgit_nocache = 0; |
26 | int cgit_snapshots = 0; | 27 | int cgit_snapshots = 0; |
27 | int cgit_enable_log_filecount = 0; | 28 | int cgit_enable_log_filecount = 0; |
28 | int cgit_enable_log_linecount = 0; | 29 | int cgit_enable_log_linecount = 0; |
29 | int cgit_max_lock_attempts = 5; | 30 | int cgit_max_lock_attempts = 5; |
30 | int cgit_cache_root_ttl = 5; | 31 | int cgit_cache_root_ttl = 5; |
31 | int cgit_cache_repo_ttl = 5; | 32 | int cgit_cache_repo_ttl = 5; |
32 | int cgit_cache_dynamic_ttl = 5; | 33 | int cgit_cache_dynamic_ttl = 5; |
33 | int cgit_cache_static_ttl = -1; | 34 | int cgit_cache_static_ttl = -1; |
34 | int cgit_cache_max_create_time = 5; | 35 | int cgit_cache_max_create_time = 5; |
35 | 36 | ||
@@ -90,24 +91,25 @@ struct repoinfo *add_repo(const char *url) | |||
90 | cgit_repolist.length *= 2; | 91 | cgit_repolist.length *= 2; |
91 | cgit_repolist.repos = xrealloc(cgit_repolist.repos, | 92 | cgit_repolist.repos = xrealloc(cgit_repolist.repos, |
92 | cgit_repolist.length * | 93 | cgit_repolist.length * |
93 | sizeof(struct repoinfo)); | 94 | sizeof(struct repoinfo)); |
94 | } | 95 | } |
95 | 96 | ||
96 | ret = &cgit_repolist.repos[cgit_repolist.count-1]; | 97 | ret = &cgit_repolist.repos[cgit_repolist.count-1]; |
97 | ret->url = xstrdup(url); | 98 | ret->url = xstrdup(url); |
98 | ret->name = ret->url; | 99 | ret->name = ret->url; |
99 | ret->path = NULL; | 100 | ret->path = NULL; |
100 | ret->desc = NULL; | 101 | ret->desc = NULL; |
101 | ret->owner = NULL; | 102 | ret->owner = NULL; |
103 | ret->group = cgit_repo_group; | ||
102 | ret->defbranch = "master"; | 104 | ret->defbranch = "master"; |
103 | ret->snapshots = cgit_snapshots; | 105 | ret->snapshots = cgit_snapshots; |
104 | ret->enable_log_filecount = cgit_enable_log_filecount; | 106 | ret->enable_log_filecount = cgit_enable_log_filecount; |
105 | ret->enable_log_linecount = cgit_enable_log_linecount; | 107 | ret->enable_log_linecount = cgit_enable_log_linecount; |
106 | ret->module_link = cgit_module_link; | 108 | ret->module_link = cgit_module_link; |
107 | return ret; | 109 | return ret; |
108 | } | 110 | } |
109 | 111 | ||
110 | struct repoinfo *cgit_get_repoinfo(const char *url) | 112 | struct repoinfo *cgit_get_repoinfo(const char *url) |
111 | { | 113 | { |
112 | int i; | 114 | int i; |
113 | struct repoinfo *repo; | 115 | struct repoinfo *repo; |
@@ -151,24 +153,26 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
151 | else if (!strcmp(name, "cache-repo-ttl")) | 153 | else if (!strcmp(name, "cache-repo-ttl")) |
152 | cgit_cache_repo_ttl = atoi(value); | 154 | cgit_cache_repo_ttl = atoi(value); |
153 | else if (!strcmp(name, "cache-static-ttl")) | 155 | else if (!strcmp(name, "cache-static-ttl")) |
154 | cgit_cache_static_ttl = atoi(value); | 156 | cgit_cache_static_ttl = atoi(value); |
155 | else if (!strcmp(name, "cache-dynamic-ttl")) | 157 | else if (!strcmp(name, "cache-dynamic-ttl")) |
156 | cgit_cache_dynamic_ttl = atoi(value); | 158 | cgit_cache_dynamic_ttl = atoi(value); |
157 | else if (!strcmp(name, "max-message-length")) | 159 | else if (!strcmp(name, "max-message-length")) |
158 | cgit_max_msg_len = atoi(value); | 160 | cgit_max_msg_len = atoi(value); |
159 | else if (!strcmp(name, "max-repodesc-length")) | 161 | else if (!strcmp(name, "max-repodesc-length")) |
160 | cgit_max_repodesc_len = atoi(value); | 162 | cgit_max_repodesc_len = atoi(value); |
161 | else if (!strcmp(name, "max-commit-count")) | 163 | else if (!strcmp(name, "max-commit-count")) |
162 | cgit_max_commit_count = atoi(value); | 164 | cgit_max_commit_count = atoi(value); |
165 | else if (!strcmp(name, "repo.group")) | ||
166 | cgit_repo_group = xstrdup(value); | ||
163 | else if (!strcmp(name, "repo.url")) | 167 | else if (!strcmp(name, "repo.url")) |
164 | cgit_repo = add_repo(value); | 168 | cgit_repo = add_repo(value); |
165 | else if (!strcmp(name, "repo.name")) | 169 | else if (!strcmp(name, "repo.name")) |
166 | cgit_repo->name = xstrdup(value); | 170 | cgit_repo->name = xstrdup(value); |
167 | else if (cgit_repo && !strcmp(name, "repo.path")) | 171 | else if (cgit_repo && !strcmp(name, "repo.path")) |
168 | cgit_repo->path = xstrdup(value); | 172 | cgit_repo->path = xstrdup(value); |
169 | else if (cgit_repo && !strcmp(name, "repo.desc")) | 173 | else if (cgit_repo && !strcmp(name, "repo.desc")) |
170 | cgit_repo->desc = xstrdup(value); | 174 | cgit_repo->desc = xstrdup(value); |
171 | else if (cgit_repo && !strcmp(name, "repo.owner")) | 175 | else if (cgit_repo && !strcmp(name, "repo.owner")) |
172 | cgit_repo->owner = xstrdup(value); | 176 | cgit_repo->owner = xstrdup(value); |
173 | else if (cgit_repo && !strcmp(name, "repo.defbranch")) | 177 | else if (cgit_repo && !strcmp(name, "repo.defbranch")) |
174 | cgit_repo->defbranch = xstrdup(value); | 178 | cgit_repo->defbranch = xstrdup(value); |