diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Clean up the whole tree
Diffstat (limited to '')
-rw-r--r--source/ui-refs.c24
1 file changed, 8 insertions, 16 deletions
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("<tr><td>");
- 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("</td><td>");
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("<a href='");
html_attr(url);
html("'>[prev]</a> ");
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(" <a href='");
html_attr(url);
html("'>[next]</a>");
@@ -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;
}