]> granicus.if.org Git - cgit/commitdiff
ui-shared: allow remote refs in branch switcher
authorChristian Hesse <mail@eworm.de>
Wed, 18 Mar 2015 17:08:48 +0000 (18:08 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 18 Mar 2015 17:23:46 +0000 (18:23 +0100)
Signed-off-by: Christian Hesse <mail@eworm.de>
ui-shared.c

index 1dd872264504c555bd0b7ee2784301c162eb28fa..ac5a2871e3625fb3c4d6a5e1f30cb1bb65561022 100644 (file)
@@ -895,6 +895,8 @@ static void print_header(void)
                        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>");