summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -4,9 +4,9 @@ CGIT_SCRIPT_PATH = /var/www/htdocs/cgit
CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
CGIT_CONFIG = /etc/cgitrc
CACHE_ROOT = /var/cache/cgit
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 1.7.0
+GIT_VER = 1.7.2.2
GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2
INSTALL = install
# Define NO_STRCASESTR if you don't have strcasestr.
@@ -70,9 +70,9 @@ endif
%.o: %.c
$(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $<
-EXTLIBS = git/libgit.a git/xdiff/lib.a -lz
+EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread
OBJECTS =
OBJECTS += cache.o
OBJECTS += cgit.o
OBJECTS += cmd.o
diff --git a/cgit.c b/cgit.c
index 4f2c752..d6146e2 100644
--- a/cgit.c
+++ b/cgit.c
@@ -21,9 +21,9 @@ const char *cgit_version = CGIT_VERSION;
void add_mimetype(const char *name, const char *value)
{
struct string_list_item *item;
- item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes);
+ item = string_list_insert(&ctx.cfg.mimetypes, xstrdup(name));
item->util = xstrdup(value);
}
struct cgit_filter *new_filter(const char *cmd, int extra_args)
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
@@ -35,9 +35,9 @@ void cgit_print_commit(char *hex, const char *prefix)
return;
}
info = cgit_parse_commit(commit);
- get_commit_notes(commit, &notes, PAGE_ENCODING, 0);
+ format_note(NULL, sha1, &notes, PAGE_ENCODING, 0);
load_ref_decorations(DECORATE_FULL_REFS);
html("<table summary='commit info' class='commit-info'>\n");
diff --git a/ui-log.c b/ui-log.c
index 7f38d2a..0536b23 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -111,9 +111,9 @@ void print_commit(struct commit *commit)
}
html("</td></tr>\n");
if (ctx.qry.showmsg) {
struct strbuf notes = STRBUF_INIT;
- get_commit_notes(commit, &notes, PAGE_ENCODING, 0);
+ format_note(NULL, commit->object.sha1, &notes, PAGE_ENCODING, 0);
if (ctx.repo->enable_log_filecount) {
cols++;
if (ctx.repo->enable_log_linecount)
diff --git a/ui-plain.c b/ui-plain.c
index da76406..1b2b672 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -33,9 +33,9 @@ static void print_object(const unsigned char *sha1, const char *path)
}
ctx.page.mimetype = NULL;
ext = strrchr(path, '.');
if (ext && *(++ext)) {
- mime = string_list_lookup(ext, &ctx.cfg.mimetypes);
+ mime = string_list_lookup(&ctx.cfg.mimetypes, ext);
if (mime)
ctx.page.mimetype = (char *)mime->util;
}
if (!ctx.page.mimetype) {
diff --git a/ui-stats.c b/ui-stats.c
index bdaf9cc..50c2540 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -174,9 +174,9 @@ static void add_commit(struct string_list *authors, struct commit *commit,
time_t t;
info = cgit_parse_commit(commit);
tmp = xstrdup(info->author);
- author = string_list_insert(tmp, authors);
+ author = string_list_insert(authors, tmp);
if (!author->util)
author->util = xcalloc(1, sizeof(struct authorstat));
else
free(tmp);
@@ -185,9 +185,9 @@ static void add_commit(struct string_list *authors, struct commit *commit,
t = info->committer_date;
date = gmtime(&t);
period->trunc(date);
tmp = xstrdup(period->pretty(date));
- item = string_list_insert(tmp, items);
+ item = string_list_insert(items, tmp);
if (item->util)
free(tmp);
item->util++;
authorstat->total++;
@@ -278,9 +278,9 @@ void print_combined_authorrow(struct string_list *authors, int from, int to,
for (i = from; i <= to; i++) {
author = &authors->items[i];
authorstat = author->util;
items = &authorstat->list;
- date = string_list_lookup(tmp, items);
+ date = string_list_lookup(items, tmp);
if (date)
subtotal += (size_t)date->util;
}
htmlf("<td class='%s'>%d</td>", centerclass, subtotal);
@@ -330,9 +330,9 @@ void print_authors(struct string_list *authors, int top,
period->dec(tm);
for (j = 0; j < period->count; j++) {
tmp = period->pretty(tm);
period->inc(tm);
- date = string_list_lookup(tmp, items);
+ date = string_list_lookup(items, tmp);
if (!date)
html("<td>0</td>");
else {
htmlf("<td>%d</td>", date->util);