all repos — cgit @ 499b23979cd29513df16e4c2acce934932e09f7a

a hyperfast web frontend for git written in c

ui-log: Do not always emit decoration span

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@logicpd.com>
Tim Nordell tim.nordell@logicpd.com
Fri, 26 Feb 2016 14:57:30 -0600
commit

499b23979cd29513df16e4c2acce934932e09f7a

parent

39735d95ca8775204ed4c5f306009707f7da79c6

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M ui-log.cui-log.c

@@ -61,6 +61,8 @@ static char buf[1024];

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/")) {