diff options
author | Tim Nordell | 2016-02-26 14:57:30 -0600 |
---|---|---|
committer | Jason A. Donenfeld | 2016-05-12 17:17:02 +0200 |
commit | 499b23979cd29513df16e4c2acce934932e09f7a (patch) | |
tree | 6ce40d01b0d917ca5acb1813ff5418fe73ca4747 /ui-log.c | |
parent | 39735d95ca8775204ed4c5f306009707f7da79c6 (diff) | |
download | cgit-499b23979cd29513df16e4c2acce934932e09f7a.tar.gz cgit-499b23979cd29513df16e4c2acce934932e09f7a.tar.bz2 cgit-499b23979cd29513df16e4c2acce934932e09f7a.zip |
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>
Diffstat (limited to 'ui-log.c')
-rw-r--r-- | ui-log.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -61,6 +61,8 @@ void show_commit_decorations(struct commit *commit) | |||
61 | 61 | ||
62 | buf[sizeof(buf) - 1] = 0; | 62 | buf[sizeof(buf) - 1] = 0; |
63 | deco = get_name_decoration(&commit->object); | 63 | deco = get_name_decoration(&commit->object); |
64 | if (!deco) | ||
65 | return; | ||
64 | html("<span class='decoration'>"); | 66 | html("<span class='decoration'>"); |
65 | while (deco) { | 67 | while (deco) { |
66 | if (starts_with(deco->name, "refs/heads/")) { | 68 | if (starts_with(deco->name, "refs/heads/")) { |