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>
Cette révision appartient à :
Tim Nordell 2016-02-26 14:57:30 -06:00 révisé par Jason A. Donenfeld
Parent 39735d95ca
révision 499b23979c

Voir le fichier

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