List for cgit developers and users
 help / color / mirror / Atom feed
From: sylvain at abstraction.fr (Sylvain Rabot)
Subject: Small patch makes cgit crash
Date: Fri, 7 Oct 2016 11:27:13 +0200	[thread overview]
Message-ID: <CADjtP1HvtBHoaeQ1w-9Ueg+=gAJGbrL5geM+rZK37ur17mDZxg@mail.gmail.com> (raw)

Hi,

I've made a small patch to make cgit's summary layout look more like
gitweb's. It works but in some cases which I wasn't able to determine
the particulars it seems to crash and the clone url and the footer are
not displayed, e.g. :

 - not displayed: http://cgit.abstraction.fr/cgit.cgi/meld.git/
 - displayed: http://cgit.abstraction.fr/cgit.cgi/postgresql.git/

Here's the patch :

diff --git a/ui-summary.c b/ui-summary.c
index 8e81ac4..d84faad 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -51,14 +51,14 @@ void cgit_print_summary(void)

     cgit_print_layout_start();
     html("<table summary='repository info' class='list nowrap'>");
-    cgit_print_branches(ctx.cfg.summary_branches);
-    htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
-    cgit_print_tags(ctx.cfg.summary_tags);
     if (ctx.cfg.summary_log > 0) {
-        htmlf("<tr class='nohover'><td
colspan='%d'>&nbsp;</td></tr>", columns);
         cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL,
                    NULL, NULL, 0, 0, 0);
+        htmlf("<tr class='nohover'><td
colspan='%d'>&nbsp;</td></tr>", columns);
     }
+    cgit_print_tags(ctx.cfg.summary_tags);
+    htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
+    cgit_print_branches(ctx.cfg.summary_branches);
     urls = 0;
     cgit_add_clone_urls(print_url);
     html("</table>");

I would appreciate any help.

Best regards.

-- 
Sylvain Rabot <sylvain at abstraction.fr>


             reply	other threads:[~2016-10-07  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  9:27 sylvain [this message]
2016-10-07  9:33 ` list
2016-10-07  9:37   ` sylvain
2016-10-07  9:51   ` list
2016-10-07 11:17     ` list
2016-10-07 11:54       ` sylvain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADjtP1HvtBHoaeQ1w-9Ueg+=gAJGbrL5geM+rZK37ur17mDZxg@mail.gmail.com' \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).