From d8a045c91469b1d121b8fd14dffaa367b194831d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 21:46:52 -1000 Subject: Clean up the whole tree --- source/ui-refs.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'source/ui-refs.c') diff --git a/source/ui-refs.c b/source/ui-refs.c index 1b32088..42a3cfb 100644 --- a/source/ui-refs.c +++ b/source/ui-refs.c @@ -73,11 +73,9 @@ static void collect_branches(struct reflist *list) { list->refs = NULL; list->alloc = list->count = 0; - refs_for_each_branch_ref(get_main_ref_store(the_repository), - cgit_refs_cb, list); + refs_for_each_branch_ref(get_main_ref_store(the_repository), cgit_refs_cb, list); if (ctx.repo->enable_remote_branches) - refs_for_each_remote_ref(get_main_ref_store(the_repository), - cgit_refs_cb, list); + refs_for_each_remote_ref(get_main_ref_store(the_repository), cgit_refs_cb, list); } static void print_branch_header(void) @@ -96,8 +94,7 @@ static int print_branch(struct refinfo *ref) if (!info) return 1; html(""); - cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL, - ctx.qry.showmsg, 0); + cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL, ctx.qry.showmsg, 0); html(""); if (ref->object->type == OBJ_COMMIT) { @@ -122,8 +119,7 @@ static void collect_tags(struct reflist *list) { list->refs = NULL; list->alloc = list->count = 0; - refs_for_each_tag_ref(get_main_ref_store(the_repository), - cgit_refs_cb, list); + refs_for_each_tag_ref(get_main_ref_store(the_repository), cgit_refs_cb, list); } static void print_tag_header(void) @@ -197,18 +193,15 @@ static void print_ref_pager(int ofs, int pagesize, int count, const char *path) if (ofs > 0) { int prev_ofs = ofs > pagesize ? ofs - pagesize : 0; - url = cgit_pageurl(ctx.qry.repo, cgit_fmt("refs/%s", path), - cgit_fmt("ofs=%d", prev_ofs)); + url = cgit_pageurl(ctx.qry.repo, cgit_fmt("refs/%s", path), cgit_fmt("ofs=%d", prev_ofs)); html("[prev] "); free(url); } - htmlf("%d - %d of %d", ofs + 1, - ofs + pagesize < count ? ofs + pagesize : count, count); + htmlf("%d - %d of %d", ofs + 1, ofs + pagesize < count ? ofs + pagesize : count, count); if (ofs + pagesize < count) { - url = cgit_pageurl(ctx.qry.repo, cgit_fmt("refs/%s", path), - cgit_fmt("ofs=%d", ofs + pagesize)); + url = cgit_pageurl(ctx.qry.repo, cgit_fmt("refs/%s", path), cgit_fmt("ofs=%d", ofs + pagesize)); html(" [next]"); @@ -225,8 +218,7 @@ static struct ref_page page_bounds(int pagesize, int count) page.start = ctx.qry.ofs > 0 ? ctx.qry.ofs : 0; if (page.start > count) page.start = count; - page.end = page.start + page.size < count ? - page.start + page.size : count; + page.end = page.start + page.size < count ? page.start + page.size : count; return page; } -- cgit v2.8.0