Use GIT-1.7.2.2
authorLars Hjemli <hjemli@gmail.com>
Sun, 22 Aug 2010 11:29:57 +0000 (13:29 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sun, 22 Aug 2010 11:29:57 +0000 (13:29 +0200)
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Makefile
cgit.c
git
ui-commit.c
ui-log.c
ui-plain.c
ui-stats.c

index 3e5a38d143a11a49b55d600e00a136aa6b82c679..2a15469c688a75b8a6cca1f5d930b693c2d6f830 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ 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
 
@@ -71,7 +71,7 @@ endif
        $(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
diff --git a/cgit.c b/cgit.c
index 4f2c752fd0d2f88bfa9f0b05e672588e3adfd99a..d6146e2270737806513b0ceca0e187475f93c121 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -22,7 +22,7 @@ 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);
 }
 
diff --git a/git b/git
index e923eaeb901ff056421b9007adcbbce271caa7b6..8c67c392e1620fc3b749aa9e0b8da13bd84226f8 160000 (submodule)
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit e923eaeb901ff056421b9007adcbbce271caa7b6
+Subproject commit 8c67c392e1620fc3b749aa9e0b8da13bd84226f8
index 45af45046a1d48e1759a18d04c51a6a77c693ae8..2b4f677832e2aa0e85e305f3ee5ada1f7de07e2c 100644 (file)
@@ -36,7 +36,7 @@ void cgit_print_commit(char *hex, const char *prefix)
        }
        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);
 
index 7f38d2acb41dc9fe451c3ba9f133eb81794b71d9..0536b23ebaa1705e627dca637b742dbb713d053f 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -112,7 +112,7 @@ 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++;
index da76406a9142c820625dd02bd53b0033ee6d1d83..1b2b67297b215ef632ebd0d36bd9cef413e4dee2 100644 (file)
@@ -34,7 +34,7 @@ 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;
        }
index bdaf9cc8e3a2533736e6dbfd8bf51d0cf6f91c2e..50c2540c860b6275b06b84576ecfd81c032e208d 100644 (file)
@@ -175,7 +175,7 @@ static void add_commit(struct string_list *authors, struct commit *commit,
 
        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
@@ -186,7 +186,7 @@ static void add_commit(struct string_list *authors, struct commit *commit,
        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++;
@@ -279,7 +279,7 @@ void print_combined_authorrow(struct string_list *authors, int from, int to,
                        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;
                }
@@ -331,7 +331,7 @@ void print_authors(struct string_list *authors, int top,
                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 {