mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-log.c: do not show remote heads if enable-remote-branches=0
If remote branches are not enabled, the branches are still listed in the log view. This patch removes them if enable-remote-branches=0.
This commit is contained in:
parent
7530d94f05
commit
0b6a716d1b
3
ui-log.c
3
ui-log.c
@ -76,6 +76,8 @@ void show_commit_decorations(struct commit *commit)
|
|||||||
cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
|
cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
|
||||||
}
|
}
|
||||||
else if (!prefixcmp(deco->name, "refs/remotes/")) {
|
else if (!prefixcmp(deco->name, "refs/remotes/")) {
|
||||||
|
if (!ctx.repo->enable_remote_branches)
|
||||||
|
goto next;
|
||||||
strncpy(buf, deco->name + 13, sizeof(buf) - 1);
|
strncpy(buf, deco->name + 13, sizeof(buf) - 1);
|
||||||
cgit_log_link(buf, NULL, "remote-deco", NULL,
|
cgit_log_link(buf, NULL, "remote-deco", NULL,
|
||||||
sha1_to_hex(commit->object.sha1),
|
sha1_to_hex(commit->object.sha1),
|
||||||
@ -88,6 +90,7 @@ void show_commit_decorations(struct commit *commit)
|
|||||||
sha1_to_hex(commit->object.sha1),
|
sha1_to_hex(commit->object.sha1),
|
||||||
ctx.qry.vpath, 0);
|
ctx.qry.vpath, 0);
|
||||||
}
|
}
|
||||||
|
next:
|
||||||
deco = deco->next;
|
deco = deco->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user