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 <[email protected]>

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

_______________________________________________
CGit mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to