From 43cd8f8e2c3a86c118a49190ba5af239a0bff150 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:23:13 -0700 Subject: Ask head_is_named before carrying the branch --- source/ui-shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ui-shared.c b/source/ui-shared.c index 2d3d069..de23353 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1648,7 +1648,7 @@ void cgit_print_clone_row(const char *url, int colspan) void cgit_add_hidden_formfields(int incl_head, int incl_search, const char *page UNUSED) { - if (incl_head && ctx.qry.head && ctx.repo->defbranch && strcmp(ctx.qry.head, ctx.repo->defbranch)) + if (incl_head && head_is_named(ctx.qry.head)) html_hidden("h", ctx.qry.head); if (ctx.qry.oid) -- cgit