]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
git: update to v2.5.0
[ps-cgit] / ui-shared.c
index 1dd872264504c555bd0b7ee2784301c162eb28fa..e755c92d79878a292f165cfcad23d66c6a6d8bcc 100644 (file)
@@ -792,7 +792,7 @@ void cgit_add_clone_urls(void (*fn)(const char *))
                add_clone_urls(fn, ctx.cfg.clone_prefix, ctx.repo->url);
 }
 
                add_clone_urls(fn, ctx.cfg.clone_prefix, ctx.repo->url);
 }
 
-static int print_branch_option(const char *refname, const unsigned char *sha1,
+static int print_branch_option(const char *refname, const struct object_id *oid,
                               int flags, void *cb_data)
 {
        char *name = (char *)refname;
                               int flags, void *cb_data)
 {
        char *name = (char *)refname;
@@ -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);
                        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>");
                        html("</select> ");
                        html("<input type='submit' name='' value='switch'/>");
                        html("</form>");