summaryrefslogtreecommitdiffabout
authorLars Hjemli <hjemli@gmail.com>2010-08-22 11:29:57 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-08-22 11:29:57 (UTC)
commit6d7552bc072599313ef423d69156d824c075572a (patch) (unidiff)
tree3189efeb6ca80dc6dcf0811ff2d8011e2b3e8c7b
parent379e80e3a83481d3639c5d312eeddcce57c486b2 (diff)
downloadcgit-6d7552bc072599313ef423d69156d824c075572a.zip
cgit-6d7552bc072599313ef423d69156d824c075572a.tar.gz
cgit-6d7552bc072599313ef423d69156d824c075572a.tar.bz2
Use GIT-1.7.2.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile4
-rw-r--r--cgit.c2
m---------git0
-rw-r--r--ui-commit.c2
-rw-r--r--ui-log.c2
-rw-r--r--ui-plain.c2
-rw-r--r--ui-stats.c8
7 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 3e5a38d..2a15469 100644
--- a/Makefile
+++ b/Makefile
@@ -2,13 +2,13 @@ CGIT_VERSION = v0.8.3.3
2CGIT_SCRIPT_NAME = cgit.cgi 2CGIT_SCRIPT_NAME = cgit.cgi
3CGIT_SCRIPT_PATH = /var/www/htdocs/cgit 3CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
4CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) 4CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
5CGIT_CONFIG = /etc/cgitrc 5CGIT_CONFIG = /etc/cgitrc
6CACHE_ROOT = /var/cache/cgit 6CACHE_ROOT = /var/cache/cgit
7SHA1_HEADER = <openssl/sha.h> 7SHA1_HEADER = <openssl/sha.h>
8GIT_VER = 1.7.0 8GIT_VER = 1.7.2.2
9GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 9GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
10INSTALL = install 10INSTALL = install
11 11
12# Define NO_STRCASESTR if you don't have strcasestr. 12# Define NO_STRCASESTR if you don't have strcasestr.
13# 13#
14# Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1 14# Define NO_OPENSSL to disable linking with OpenSSL and use bundled SHA1
@@ -68,13 +68,13 @@ endif
68# Define a pattern rule for silent object building 68# Define a pattern rule for silent object building
69# 69#
70%.o: %.c 70%.o: %.c
71 $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< 71 $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
72 72
73 73
74EXTLIBS = git/libgit.a git/xdiff/lib.a -lz 74EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread
75OBJECTS = 75OBJECTS =
76OBJECTS += cache.o 76OBJECTS += cache.o
77OBJECTS += cgit.o 77OBJECTS += cgit.o
78OBJECTS += cmd.o 78OBJECTS += cmd.o
79OBJECTS += configfile.o 79OBJECTS += configfile.o
80OBJECTS += html.o 80OBJECTS += html.o
diff --git a/cgit.c b/cgit.c
index 4f2c752..d6146e2 100644
--- a/cgit.c
+++ b/cgit.c
@@ -19,13 +19,13 @@
19const char *cgit_version = CGIT_VERSION; 19const char *cgit_version = CGIT_VERSION;
20 20
21void add_mimetype(const char *name, const char *value) 21void add_mimetype(const char *name, const char *value)
22{ 22{
23 struct string_list_item *item; 23 struct string_list_item *item;
24 24
25 item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes); 25 item = string_list_insert(&ctx.cfg.mimetypes, xstrdup(name));
26 item->util = xstrdup(value); 26 item->util = xstrdup(value);
27} 27}
28 28
29struct cgit_filter *new_filter(const char *cmd, int extra_args) 29struct cgit_filter *new_filter(const char *cmd, int extra_args)
30{ 30{
31 struct cgit_filter *f; 31 struct cgit_filter *f;
diff --git a/git b/git
Subproject e923eaeb901ff056421b9007adcbbce271caa7b Subproject 8c67c392e1620fc3b749aa9e0b8da13bd84226f
diff --git a/ui-commit.c b/ui-commit.c
index 45af450..2b4f677 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -33,13 +33,13 @@ void cgit_print_commit(char *hex, const char *prefix)
33 if (!commit) { 33 if (!commit) {
34 cgit_print_error(fmt("Bad commit reference: %s", hex)); 34 cgit_print_error(fmt("Bad commit reference: %s", hex));
35 return; 35 return;
36 } 36 }
37 info = cgit_parse_commit(commit); 37 info = cgit_parse_commit(commit);
38 38
39 get_commit_notes(commit, &notes, PAGE_ENCODING, 0); 39 format_note(NULL, sha1, &notes, PAGE_ENCODING, 0);
40 40
41 load_ref_decorations(DECORATE_FULL_REFS); 41 load_ref_decorations(DECORATE_FULL_REFS);
42 42
43 html("<table summary='commit info' class='commit-info'>\n"); 43 html("<table summary='commit info' class='commit-info'>\n");
44 html("<tr><th>author</th><td>"); 44 html("<tr><th>author</th><td>");
45 html_txt(info->author); 45 html_txt(info->author);
diff --git a/ui-log.c b/ui-log.c
index 7f38d2a..0536b23 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -109,13 +109,13 @@ void print_commit(struct commit *commit)
109 htmlf("-%d/+%d", rem_lines, add_lines); 109 htmlf("-%d/+%d", rem_lines, add_lines);
110 } 110 }
111 } 111 }
112 html("</td></tr>\n"); 112 html("</td></tr>\n");
113 if (ctx.qry.showmsg) { 113 if (ctx.qry.showmsg) {
114 struct strbuf notes = STRBUF_INIT; 114 struct strbuf notes = STRBUF_INIT;
115 get_commit_notes(commit, &notes, PAGE_ENCODING, 0); 115 format_note(NULL, commit->object.sha1, &notes, PAGE_ENCODING, 0);
116 116
117 if (ctx.repo->enable_log_filecount) { 117 if (ctx.repo->enable_log_filecount) {
118 cols++; 118 cols++;
119 if (ctx.repo->enable_log_linecount) 119 if (ctx.repo->enable_log_linecount)
120 cols++; 120 cols++;
121 } 121 }
diff --git a/ui-plain.c b/ui-plain.c
index da76406..1b2b672 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -31,13 +31,13 @@ static void print_object(const unsigned char *sha1, const char *path)
31 html_status(404, "Not found", 0); 31 html_status(404, "Not found", 0);
32 return; 32 return;
33 } 33 }
34 ctx.page.mimetype = NULL; 34 ctx.page.mimetype = NULL;
35 ext = strrchr(path, '.'); 35 ext = strrchr(path, '.');
36 if (ext && *(++ext)) { 36 if (ext && *(++ext)) {
37 mime = string_list_lookup(ext, &ctx.cfg.mimetypes); 37 mime = string_list_lookup(&ctx.cfg.mimetypes, ext);
38 if (mime) 38 if (mime)
39 ctx.page.mimetype = (char *)mime->util; 39 ctx.page.mimetype = (char *)mime->util;
40 } 40 }
41 if (!ctx.page.mimetype) { 41 if (!ctx.page.mimetype) {
42 if (buffer_is_binary(buf, size)) 42 if (buffer_is_binary(buf, size))
43 ctx.page.mimetype = "application/octet-stream"; 43 ctx.page.mimetype = "application/octet-stream";
diff --git a/ui-stats.c b/ui-stats.c
index bdaf9cc..50c2540 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -172,24 +172,24 @@ static void add_commit(struct string_list *authors, struct commit *commit,
172 char *tmp; 172 char *tmp;
173 struct tm *date; 173 struct tm *date;
174 time_t t; 174 time_t t;
175 175
176 info = cgit_parse_commit(commit); 176 info = cgit_parse_commit(commit);
177 tmp = xstrdup(info->author); 177 tmp = xstrdup(info->author);
178 author = string_list_insert(tmp, authors); 178 author = string_list_insert(authors, tmp);
179 if (!author->util) 179 if (!author->util)
180 author->util = xcalloc(1, sizeof(struct authorstat)); 180 author->util = xcalloc(1, sizeof(struct authorstat));
181 else 181 else
182 free(tmp); 182 free(tmp);
183 authorstat = author->util; 183 authorstat = author->util;
184 items = &authorstat->list; 184 items = &authorstat->list;
185 t = info->committer_date; 185 t = info->committer_date;
186 date = gmtime(&t); 186 date = gmtime(&t);
187 period->trunc(date); 187 period->trunc(date);
188 tmp = xstrdup(period->pretty(date)); 188 tmp = xstrdup(period->pretty(date));
189 item = string_list_insert(tmp, items); 189 item = string_list_insert(items, tmp);
190 if (item->util) 190 if (item->util)
191 free(tmp); 191 free(tmp);
192 item->util++; 192 item->util++;
193 authorstat->total++; 193 authorstat->total++;
194 cgit_free_commitinfo(info); 194 cgit_free_commitinfo(info);
195} 195}
@@ -276,13 +276,13 @@ void print_combined_authorrow(struct string_list *authors, int from, int to,
276 period->inc(tm); 276 period->inc(tm);
277 subtotal = 0; 277 subtotal = 0;
278 for (i = from; i <= to; i++) { 278 for (i = from; i <= to; i++) {
279 author = &authors->items[i]; 279 author = &authors->items[i];
280 authorstat = author->util; 280 authorstat = author->util;
281 items = &authorstat->list; 281 items = &authorstat->list;
282 date = string_list_lookup(tmp, items); 282 date = string_list_lookup(items, tmp);
283 if (date) 283 if (date)
284 subtotal += (size_t)date->util; 284 subtotal += (size_t)date->util;
285 } 285 }
286 htmlf("<td class='%s'>%d</td>", centerclass, subtotal); 286 htmlf("<td class='%s'>%d</td>", centerclass, subtotal);
287 total += subtotal; 287 total += subtotal;
288 } 288 }
@@ -328,13 +328,13 @@ void print_authors(struct string_list *authors, int top,
328 total = 0; 328 total = 0;
329 for (j = 0; j < period->count; j++) 329 for (j = 0; j < period->count; j++)
330 period->dec(tm); 330 period->dec(tm);
331 for (j = 0; j < period->count; j++) { 331 for (j = 0; j < period->count; j++) {
332 tmp = period->pretty(tm); 332 tmp = period->pretty(tm);
333 period->inc(tm); 333 period->inc(tm);
334 date = string_list_lookup(tmp, items); 334 date = string_list_lookup(items, tmp);
335 if (!date) 335 if (!date)
336 html("<td>0</td>"); 336 html("<td>0</td>");
337 else { 337 else {
338 htmlf("<td>%d</td>", date->util); 338 htmlf("<td>%d</td>", date->util);
339 total += (size_t)date->util; 339 total += (size_t)date->util;
340 } 340 }