List for cgit developers and users
 help / color / mirror / Atom feed
From: tim.nordell at logicpd.com (Tim Nordell)
Subject: [PATCH 1/2] ui-log: Do not always emit decoration span
Date: Fri, 26 Feb 2016 14:57:30 -0600	[thread overview]
Message-ID: <1456520251-22349-2-git-send-email-tim.nordell@logicpd.com> (raw)
In-Reply-To: <1456520251-22349-1-git-send-email-tim.nordell@logicpd.com>

The decoration span does not need to be emited if there aren't
any decorations to show.  This modification saves slightly
on bandwidth.

Signed-off-by: Tim Nordell <tim.nordell at logicpd.com>

diff --git a/ui-log.c b/ui-log.c
index 0a3938b..62881ce 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -61,6 +61,8 @@ void show_commit_decorations(struct commit *commit)
 
 	buf[sizeof(buf) - 1] = 0;
 	deco = get_name_decoration(&commit->object);
+	if(!deco)
+		return;
 	html("<span class='decoration'>");
 	while (deco) {
 		if (starts_with(deco->name, "refs/heads/")) {
-- 
2.4.9



  reply	other threads:[~2016-02-26 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 20:57 [PATCH 0/2] ui-log: Don't print out unknown decoration types tim.nordell
2016-02-26 20:57 ` tim.nordell [this message]
2016-02-28 12:40   ` [PATCH 1/2] ui-log: Do not always emit decoration span john
2016-05-12 15:16   ` Jason

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=1456520251-22349-2-git-send-email-tim.nordell@logicpd.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).