author | Jason A. Donenfeld <Jason@zx2c4.com> | 2010-07-29 17:47:50 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-08-04 01:09:32 (UTC) |
commit | 2e4a941626c240bc7858aa7564882c01f657f4e8 (patch) (unidiff) | |
tree | 505c17fab5afcb99cfddf2c4aad0b95c8670f001 /cgit.h | |
parent | 3516502aa0df95ecc241caa30161741f59e4e600 (diff) | |
download | cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.zip cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.tar.gz cgit-2e4a941626c240bc7858aa7564882c01f657f4e8.tar.bz2 |
Add support for 'remove-suffix' option
When this option is enabled, the '.git' suffix of repository directories
found while processing the 'scan-path' option will be removed.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -141,128 +141,129 @@ struct cgit_query { | |||
141 | char *mimetype; | 141 | char *mimetype; |
142 | char *url; | 142 | char *url; |
143 | char *period; | 143 | char *period; |
144 | int ofs; | 144 | int ofs; |
145 | int nohead; | 145 | int nohead; |
146 | char *sort; | 146 | char *sort; |
147 | int showmsg; | 147 | int showmsg; |
148 | int ssdiff; | 148 | int ssdiff; |
149 | int show_all; | 149 | int show_all; |
150 | int context; | 150 | int context; |
151 | int ignorews; | 151 | int ignorews; |
152 | char *vpath; | 152 | char *vpath; |
153 | }; | 153 | }; |
154 | 154 | ||
155 | struct cgit_config { | 155 | struct cgit_config { |
156 | char *agefile; | 156 | char *agefile; |
157 | char *cache_root; | 157 | char *cache_root; |
158 | char *clone_prefix; | 158 | char *clone_prefix; |
159 | char *css; | 159 | char *css; |
160 | char *favicon; | 160 | char *favicon; |
161 | char *footer; | 161 | char *footer; |
162 | char *head_include; | 162 | char *head_include; |
163 | char *header; | 163 | char *header; |
164 | char *index_header; | 164 | char *index_header; |
165 | char *index_info; | 165 | char *index_info; |
166 | char *logo; | 166 | char *logo; |
167 | char *logo_link; | 167 | char *logo_link; |
168 | char *module_link; | 168 | char *module_link; |
169 | char *project_list; | 169 | char *project_list; |
170 | char *robots; | 170 | char *robots; |
171 | char *root_title; | 171 | char *root_title; |
172 | char *root_desc; | 172 | char *root_desc; |
173 | char *root_readme; | 173 | char *root_readme; |
174 | char *script_name; | 174 | char *script_name; |
175 | char *section; | 175 | char *section; |
176 | char *virtual_root; | 176 | char *virtual_root; |
177 | int cache_size; | 177 | int cache_size; |
178 | int cache_dynamic_ttl; | 178 | int cache_dynamic_ttl; |
179 | int cache_max_create_time; | 179 | int cache_max_create_time; |
180 | int cache_repo_ttl; | 180 | int cache_repo_ttl; |
181 | int cache_root_ttl; | 181 | int cache_root_ttl; |
182 | int cache_scanrc_ttl; | 182 | int cache_scanrc_ttl; |
183 | int cache_static_ttl; | 183 | int cache_static_ttl; |
184 | int embedded; | 184 | int embedded; |
185 | int enable_filter_overrides; | 185 | int enable_filter_overrides; |
186 | int enable_index_links; | 186 | int enable_index_links; |
187 | int enable_log_filecount; | 187 | int enable_log_filecount; |
188 | int enable_log_linecount; | 188 | int enable_log_linecount; |
189 | int enable_remote_branches; | 189 | int enable_remote_branches; |
190 | int enable_subject_links; | 190 | int enable_subject_links; |
191 | int enable_tree_linenumbers; | 191 | int enable_tree_linenumbers; |
192 | int local_time; | 192 | int local_time; |
193 | int max_atom_items; | 193 | int max_atom_items; |
194 | int max_repo_count; | 194 | int max_repo_count; |
195 | int max_commit_count; | 195 | int max_commit_count; |
196 | int max_lock_attempts; | 196 | int max_lock_attempts; |
197 | int max_msg_len; | 197 | int max_msg_len; |
198 | int max_repodesc_len; | 198 | int max_repodesc_len; |
199 | int max_blob_size; | 199 | int max_blob_size; |
200 | int max_stats; | 200 | int max_stats; |
201 | int nocache; | 201 | int nocache; |
202 | int noplainemail; | 202 | int noplainemail; |
203 | int noheader; | 203 | int noheader; |
204 | int renamelimit; | 204 | int renamelimit; |
205 | int remove_suffix; | ||
205 | int snapshots; | 206 | int snapshots; |
206 | int summary_branches; | 207 | int summary_branches; |
207 | int summary_log; | 208 | int summary_log; |
208 | int summary_tags; | 209 | int summary_tags; |
209 | int ssdiff; | 210 | int ssdiff; |
210 | struct string_list mimetypes; | 211 | struct string_list mimetypes; |
211 | struct cgit_filter *about_filter; | 212 | struct cgit_filter *about_filter; |
212 | struct cgit_filter *commit_filter; | 213 | struct cgit_filter *commit_filter; |
213 | struct cgit_filter *source_filter; | 214 | struct cgit_filter *source_filter; |
214 | }; | 215 | }; |
215 | 216 | ||
216 | struct cgit_page { | 217 | struct cgit_page { |
217 | time_t modified; | 218 | time_t modified; |
218 | time_t expires; | 219 | time_t expires; |
219 | size_t size; | 220 | size_t size; |
220 | char *mimetype; | 221 | char *mimetype; |
221 | char *charset; | 222 | char *charset; |
222 | char *filename; | 223 | char *filename; |
223 | char *etag; | 224 | char *etag; |
224 | char *title; | 225 | char *title; |
225 | int status; | 226 | int status; |
226 | char *statusmsg; | 227 | char *statusmsg; |
227 | }; | 228 | }; |
228 | 229 | ||
229 | struct cgit_environment { | 230 | struct cgit_environment { |
230 | char *cgit_config; | 231 | char *cgit_config; |
231 | char *http_host; | 232 | char *http_host; |
232 | char *https; | 233 | char *https; |
233 | char *no_http; | 234 | char *no_http; |
234 | char *path_info; | 235 | char *path_info; |
235 | char *query_string; | 236 | char *query_string; |
236 | char *request_method; | 237 | char *request_method; |
237 | char *script_name; | 238 | char *script_name; |
238 | char *server_name; | 239 | char *server_name; |
239 | char *server_port; | 240 | char *server_port; |
240 | }; | 241 | }; |
241 | 242 | ||
242 | struct cgit_context { | 243 | struct cgit_context { |
243 | struct cgit_environment env; | 244 | struct cgit_environment env; |
244 | struct cgit_query qry; | 245 | struct cgit_query qry; |
245 | struct cgit_config cfg; | 246 | struct cgit_config cfg; |
246 | struct cgit_repo *repo; | 247 | struct cgit_repo *repo; |
247 | struct cgit_page page; | 248 | struct cgit_page page; |
248 | }; | 249 | }; |
249 | 250 | ||
250 | struct cgit_snapshot_format { | 251 | struct cgit_snapshot_format { |
251 | const char *suffix; | 252 | const char *suffix; |
252 | const char *mimetype; | 253 | const char *mimetype; |
253 | write_archive_fn_t write_func; | 254 | write_archive_fn_t write_func; |
254 | int bit; | 255 | int bit; |
255 | }; | 256 | }; |
256 | 257 | ||
257 | extern const char *cgit_version; | 258 | extern const char *cgit_version; |
258 | 259 | ||
259 | extern struct cgit_repolist cgit_repolist; | 260 | extern struct cgit_repolist cgit_repolist; |
260 | extern struct cgit_context ctx; | 261 | extern struct cgit_context ctx; |
261 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; | 262 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
262 | 263 | ||
263 | extern struct cgit_repo *cgit_add_repo(const char *url); | 264 | extern struct cgit_repo *cgit_add_repo(const char *url); |
264 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); | 265 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
265 | extern void cgit_repo_config_cb(const char *name, const char *value); | 266 | extern void cgit_repo_config_cb(const char *name, const char *value); |
266 | 267 | ||
267 | extern int chk_zero(int result, char *msg); | 268 | extern int chk_zero(int result, char *msg); |
268 | extern int chk_positive(int result, char *msg); | 269 | extern int chk_positive(int result, char *msg); |