all repos — cgit @ 0b6a716d1b9f18e8cc00940a7962e542b9358238

a hyperfast web frontend for git written in c

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.
Georg Müller georgmueller@gmx.net
Tue, 03 Jan 2012 15:30:50 +0000
commit

0b6a716d1b9f18e8cc00940a7962e542b9358238

parent

7530d94f05887b8065742adb614c368d8568a22c

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M ui-log.cui-log.c

@@ -76,6 +76,8 @@ strncpy(buf, deco->name + 10, sizeof(buf) - 1);

cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); } else if (!prefixcmp(deco->name, "refs/remotes/")) { + if (!ctx.repo->enable_remote_branches) + goto next; strncpy(buf, deco->name + 13, sizeof(buf) - 1); cgit_log_link(buf, NULL, "remote-deco", NULL, sha1_to_hex(commit->object.sha1),

@@ -88,6 +90,7 @@ cgit_commit_link(buf, NULL, "deco", ctx.qry.head,

sha1_to_hex(commit->object.sha1), ctx.qry.vpath, 0); } +next: deco = deco->next; } }