all repos — cgit @ d1ddce90f58e9b7fc00c39d912a4c8d1b3e27595

a hyperfast web frontend for git written in c

ui-shared: allow remote refs in branch switcher

Signed-off-by: Christian Hesse <mail@eworm.de>
Christian Hesse mail@eworm.de
Wed, 18 Mar 2015 18:08:48 +0100
commit

d1ddce90f58e9b7fc00c39d912a4c8d1b3e27595

parent

84627609f5a7634732fe1d718e7d1c18254e64c8

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

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

@@ -895,6 +895,8 @@ html("<form method='get' action=''>\n");

cgit_add_hidden_formfields(0, 1, ctx.qry.page); html("<select name='h' onchange='this.form.submit();'>\n"); for_each_branch_ref(print_branch_option, ctx.qry.head); + if (ctx.repo->enable_remote_branches) + for_each_remote_ref(print_branch_option, ctx.qry.head); html("</select> "); html("<input type='submit' name='' value='switch'/>"); html("</form>");