diff options
-rw-r--r-- | cgit-70.c | 1 | ||||
-rw-r--r-- | cgit_70.mk | 8 | ||||
-rw-r--r-- | cmd_70.c | 41 | ||||
-rw-r--r-- | ui_70-commit.c | 1 | ||||
-rw-r--r-- | ui_70-diff.c | 1 | ||||
-rw-r--r-- | ui_70-log.c | 3 | ||||
-rw-r--r-- | ui_70-patch.c | 1 | ||||
-rw-r--r-- | ui_70-refs.c | 3 | ||||
-rw-r--r-- | ui_70-repolist.c | 7 | ||||
-rw-r--r-- | ui_70-shared.c | 15 | ||||
-rw-r--r-- | ui_70-summary.c | 7 | ||||
-rw-r--r-- | ui_70-tree.c | 1 |
12 files changed, 61 insertions, 28 deletions
@@ -1,6 +1,7 @@ /* cgit.c: cgi for the git scm * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -79,10 +79,10 @@ CGIT_OBJ_NAMES += html.o CGIT_OBJ_NAMES += parsing.o CGIT_OBJ_NAMES += scan-tree.o CGIT_OBJ_NAMES += shared.o -CGIT_OBJ_NAMES += ui-atom.o -CGIT_OBJ_NAMES += ui-blame.o +##CGIT_OBJ_NAMES += ui-atom.o +##CGIT_OBJ_NAMES += ui-blame.o CGIT_OBJ_NAMES += ui-blob.o -CGIT_OBJ_NAMES += ui-clone.o +##CGIT_OBJ_NAMES += ui-clone.o ##CGIT_OBJ_NAMES += ui-commit.o CGIT_OBJ_NAMES += ui_70-commit.o ##CGIT_OBJ_NAMES += ui-diff.o @@ -99,7 +99,7 @@ CGIT_OBJ_NAMES += ui_70-repolist.o ##CGIT_OBJ_NAMES += ui-shared.o CGIT_OBJ_NAMES += ui_70-shared.o CGIT_OBJ_NAMES += ui-snapshot.o -CGIT_OBJ_NAMES += ui-ssdiff.o +##CGIT_OBJ_NAMES += ui-ssdiff.o CGIT_OBJ_NAMES += ui-stats.o ##CGIT_OBJ_NAMES += ui-summary.o CGIT_OBJ_NAMES += ui_70-summary.o @@ -1,6 +1,7 @@ /* cmd.c: the cgit command dispatcher * * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -9,7 +10,7 @@ #include "cgit.h" #include "cmd.h" #include "cache.h" -#include "ui-shared.h" +#include "ui_70-shared.h" #include "ui-atom.h" #include "ui-blame.h" #include "ui-blob.h" @@ -29,16 +30,23 @@ static void HEAD_fn(void) { - cgit_clone_head(); + cgit_gopher_error("Not implemented"); + return; +/* cgit_clone_head();*/ } static void atom_fn(void) { - cgit_print_atom(ctx.qry.head, ctx.qry.path, ctx.cfg.max_atom_items); + cgit_gopher_error("Not implemented"); + return; +/* cgit_print_atom(ctx.qry.head, ctx.qry.path, ctx.cfg.max_atom_items);*/ } static void about_fn(void) { + cgit_gopher_error("Not implemented"); + return; +/* if (ctx.repo) { size_t path_info_len = ctx.env.path_info ? strlen(ctx.env.path_info) : 0; if (!ctx.qry.path && @@ -62,19 +70,27 @@ static void about_fn(void) } } else cgit_print_site_readme(); +*/ } + static void blame_fn(void) { + cgit_gopher_error("Not implemented"); + return; +/* if (ctx.cfg.enable_blame) cgit_print_blame(); else cgit_print_error_page(403, "Forbidden", "Blame is disabled"); +*/ } static void blob_fn(void) { - cgit_print_blob(ctx.qry.sha1, ctx.qry.path, ctx.qry.head, 0); + cgit_gopher_error("Not implemented"); + return; +/* cgit_print_blob(ctx.qry.sha1, ctx.qry.path, ctx.qry.head, 0);*/ } static void commit_fn(void) @@ -94,7 +110,9 @@ static void rawdiff_fn(void) static void info_fn(void) { - cgit_clone_info(); + cgit_gopher_error("Not implemented"); + return; +/* cgit_clone_info();*/ } static void log_fn(void) @@ -115,7 +133,9 @@ static void ls_cache_fn(void) static void objects_fn(void) { - cgit_clone_objects(); + cgit_gopher_error("Not implemented"); + return; +/* cgit_clone_objects();*/ } static void repolist_fn(void) @@ -140,13 +160,16 @@ static void refs_fn(void) static void snapshot_fn(void) { - cgit_print_snapshot(ctx.qry.head, ctx.qry.sha1, ctx.qry.path, - ctx.qry.nohead); + cgit_gopher_error("Not implemented"); + return; +/* cgit_print_snapshot(ctx.qry.head, ctx.qry.sha1, ctx.qry.path, ctx.qry.nohead);*/ } static void stats_fn(void) { - cgit_show_stats(); + cgit_gopher_error("Not implemented"); + return; +/* cgit_show_stats();*/ } static void summary_fn(void) diff --git a/ui_70-commit.c b/ui_70-commit.c index d89f1b2..082ebee 100644 --- a/ui_70-commit.c +++ b/ui_70-commit.c @@ -1,6 +1,7 @@ /* ui-commit.c: generate commit view * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) diff --git a/ui_70-diff.c b/ui_70-diff.c index 46e729d..2fe52b9 100644 --- a/ui_70-diff.c +++ b/ui_70-diff.c @@ -1,6 +1,7 @@ /* ui-diff.c: show diff between two blobs * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) diff --git a/ui_70-log.c b/ui_70-log.c index 598634d..04c2e79 100644 --- a/ui_70-log.c +++ b/ui_70-log.c @@ -1,6 +1,7 @@ /* ui-log.c: functions for log output * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -532,11 +533,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern } cgit_print_layout_end(); } else if ((commit = get_revision(&rev)) != NULL) { - htmlf("<tr class='nohover'><td colspan='%d'>", columns); cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, ctx.qry.vpath, 0, NULL, NULL, ctx.qry.showmsg, ctx.qry.follow); - html("</td></tr>\n"); } /* If we allocated tip then it is safe to cast away const. */ diff --git a/ui_70-patch.c b/ui_70-patch.c index 2e5a5d7..70f159e 100644 --- a/ui_70-patch.c +++ b/ui_70-patch.c @@ -1,6 +1,7 @@ /* ui-patch.c: generate patch view * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) diff --git a/ui_70-refs.c b/ui_70-refs.c index 8bf65af..7d62e03 100644 --- a/ui_70-refs.c +++ b/ui_70-refs.c @@ -1,6 +1,7 @@ /* ui-refs.c: browse symbolic refs * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -97,7 +98,7 @@ static int print_tag(struct refinfo *ref) cgit_gopher_start_selector(GOPHER_MENU); cgit_gopher_text_pad(name, GOPHER_SUMMARY_NAME_LEN); - cgit_gopher_text_pad("@@@ commit id here @@@", GOPHER_SUMMARY_DESC_LEN); + cgit_gopher_text_pad(oid_to_hex(&obj->oid), GOPHER_SUMMARY_DESC_LEN); if (info) { if (info->tagger) { cgit_gopher_text_pad(info->tagger, GOPHER_SUMMARY_AUTH_LEN); diff --git a/ui_70-repolist.c b/ui_70-repolist.c index 7a4e6ae..7cf1da9 100644 --- a/ui_70-repolist.c +++ b/ui_70-repolist.c @@ -1,6 +1,7 @@ /* ui-repolist.c: functions for generating the repolist page * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -110,8 +111,10 @@ static int is_in_url(struct cgit_repo *repo) static int is_visible(struct cgit_repo *repo) { - if (repo->hide || repo->ignore) + if (repo->hide || repo->ignore){ + fprintf(stderr, "%s is invisible or ignored", repo->name); return 0; + } if (!(is_match(repo) && is_in_url(repo))) return 0; return 1; @@ -248,7 +251,7 @@ void cgit_print_repolist(void) int sorted = 0; if (!any_repos_visible()) { - cgit_gopher_error("No repositories found"); + cgit_gopher_error("No visible repositories found"); return; } diff --git a/ui_70-shared.c b/ui_70-shared.c index 3262320..a1b98b7 100644 --- a/ui_70-shared.c +++ b/ui_70-shared.c @@ -1,8 +1,11 @@ -/* -* -* Gopher-related functions -* -*/ +/* ui-shared.c: common web output functions + * + * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> + * + * Licensed under GNU General Public License v2 + * (see COPYING for full license text) + */ #include <stdio.h> #include "cgit.h" @@ -244,7 +247,7 @@ const char *cgit_rooturl(void) if (ctx.cfg.virtual_root) return ctx.cfg.virtual_root; else - return ctx.cfg.script_name; + return fmtalloc("/%s", ctx.cfg.script_name); } const char *cgit_loginurl(void) diff --git a/ui_70-summary.c b/ui_70-summary.c index e398e50..8db5c7f 100644 --- a/ui_70-summary.c +++ b/ui_70-summary.c @@ -1,6 +1,7 @@ /* ui-summary.c: functions for generating repo summary page * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -53,13 +54,11 @@ void cgit_print_summary(void) cgit_print_branches(ctx.cfg.summary_branches); cgit_print_tags(ctx.cfg.summary_tags); - /* FIXME: removed log -- reintroduce it as soon as we have a working cgit_print_log */ -/* if (ctx.cfg.summary_log > 0) { - htmlf("<tr class='nohover'><td colspan='%d'> </td></tr>", columns); + if (ctx.cfg.summary_log > 0) { cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL, NULL, NULL, 0, 0, 0); } -*/ + urls = 0; } diff --git a/ui_70-tree.c b/ui_70-tree.c index c0c2be3..81383b8 100644 --- a/ui_70-tree.c +++ b/ui_70-tree.c @@ -1,6 +1,7 @@ /* ui-tree.c: functions for tree output * * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> + * 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) |