]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
Enable default value for head parameter
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 3c11ff0a8f9021a20bf20771a617c7c53ebe6aac..b282a67d17bd24e7bf16610e5c7ce48b775c7e70 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -65,6 +65,9 @@ static void cgit_print_repo_page(struct cacheitem *item)
        char *title;
        int show_search;
 
+       if (!cgit_query_head)
+               cgit_query_head = cgit_repo->defbranch;
+
        if (chdir(cgit_repo->path)) {
                title = fmt("%s - %s", cgit_root_title, "Bad request");
                cgit_print_docstart(title, item);