|
diff --git a/shared.c b/shared.c index 6117f5c..84aa281 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -103,33 +103,33 @@ struct repoinfo *add_repo(const char *url) |
103 | struct repoinfo *ret; |
103 | struct repoinfo *ret; |
104 | |
104 | |
105 | if (++cgit_repolist.count > cgit_repolist.length) { |
105 | if (++cgit_repolist.count > cgit_repolist.length) { |
106 | if (cgit_repolist.length == 0) |
106 | if (cgit_repolist.length == 0) |
107 | cgit_repolist.length = 8; |
107 | cgit_repolist.length = 8; |
108 | else |
108 | else |
109 | cgit_repolist.length *= 2; |
109 | cgit_repolist.length *= 2; |
110 | cgit_repolist.repos = xrealloc(cgit_repolist.repos, |
110 | cgit_repolist.repos = xrealloc(cgit_repolist.repos, |
111 | cgit_repolist.length * |
111 | cgit_repolist.length * |
112 | sizeof(struct repoinfo)); |
112 | sizeof(struct repoinfo)); |
113 | } |
113 | } |
114 | |
114 | |
115 | ret = &cgit_repolist.repos[cgit_repolist.count-1]; |
115 | ret = &cgit_repolist.repos[cgit_repolist.count-1]; |
116 | ret->url = trim_end(url, '/'); |
116 | ret->url = trim_end(url, '/'); |
117 | ret->name = ret->url; |
117 | ret->name = ret->url; |
118 | ret->path = NULL; |
118 | ret->path = NULL; |
119 | ret->desc = NULL; |
119 | ret->desc = "[no description]"; |
120 | ret->owner = NULL; |
120 | ret->owner = NULL; |
121 | ret->group = cgit_repo_group; |
121 | ret->group = cgit_repo_group; |
122 | ret->defbranch = "master"; |
122 | ret->defbranch = "master"; |
123 | ret->snapshots = cgit_snapshots; |
123 | ret->snapshots = cgit_snapshots; |
124 | ret->enable_log_filecount = cgit_enable_log_filecount; |
124 | ret->enable_log_filecount = cgit_enable_log_filecount; |
125 | ret->enable_log_linecount = cgit_enable_log_linecount; |
125 | ret->enable_log_linecount = cgit_enable_log_linecount; |
126 | ret->module_link = cgit_module_link; |
126 | ret->module_link = cgit_module_link; |
127 | ret->readme = NULL; |
127 | ret->readme = NULL; |
128 | return ret; |
128 | return ret; |
129 | } |
129 | } |
130 | |
130 | |
131 | struct repoinfo *cgit_get_repoinfo(const char *url) |
131 | struct repoinfo *cgit_get_repoinfo(const char *url) |
132 | { |
132 | { |
133 | int i; |
133 | int i; |
134 | struct repoinfo *repo; |
134 | struct repoinfo *repo; |
135 | |
135 | |
|