mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 08:28:42 +00:00
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>
This commit is contained in:
parent
39735d95ca
commit
499b23979c
2
ui-log.c
2
ui-log.c
@ -61,6 +61,8 @@ void show_commit_decorations(struct commit *commit)
|
|||||||
|
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
deco = get_name_decoration(&commit->object);
|
deco = get_name_decoration(&commit->object);
|
||||||
|
if (!deco)
|
||||||
|
return;
|
||||||
html("<span class='decoration'>");
|
html("<span class='decoration'>");
|
||||||
while (deco) {
|
while (deco) {
|
||||||
if (starts_with(deco->name, "refs/heads/")) {
|
if (starts_with(deco->name, "refs/heads/")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user