From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Sun, 28 Feb 2016 12:40:22 +0000 Subject: [PATCH 1/2] ui-log: Do not always emit decoration span In-Reply-To: <1456520251-22349-2-git-send-email-tim.nordell@logicpd.com> References: <1456520251-22349-1-git-send-email-tim.nordell@logicpd.com> <1456520251-22349-2-git-send-email-tim.nordell@logicpd.com> Message-ID: <20160228124022.GY1766@serenity.lan> On Fri, Feb 26, 2016 at 02:57:30PM -0600, Tim Nordell wrote: > 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 > > 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) style nit: if (!deco) otherwise: Reviewed-by: John Keeping > + return; > html(""); > while (deco) { > if (starts_with(deco->name, "refs/heads/")) { > -- > 2.4.9 > > _______________________________________________ > CGit mailing list > CGit at lists.zx2c4.com > http://lists.zx2c4.com/mailman/listinfo/cgit