Search
j0ke.net Open Build Service
>
Projects
>
devel
>
git
> cgit_fix_stringlist.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File cgit_fix_stringlist.patch of Package git (Revision 7)
Currently displaying revision
7
,
show latest
Index: cgit-0.8.3.3/cgit.c =================================================================== --- cgit-0.8.3.3.orig/cgit.c +++ cgit-0.8.3.3/cgit.c @@ -21,7 +21,7 @@ void add_mimetype(const char *name, cons { 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); } Index: cgit-0.8.3.3/ui-stats.c =================================================================== --- cgit-0.8.3.3.orig/ui-stats.c +++ cgit-0.8.3.3/ui-stats.c @@ -175,7 +175,7 @@ static void add_commit(struct string_lis 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_lis 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 str 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 *a 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 { Index: cgit-0.8.3.3/ui-plain.c =================================================================== --- cgit-0.8.3.3.orig/ui-plain.c +++ cgit-0.8.3.3/ui-plain.c @@ -35,7 +35,7 @@ static void print_object(const unsigned 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; }