commit - 00abe30b6011e389018622a47995f9390b166182
commit + b3ba36c380dd6686b46f27d33ed4e8ee67d7426d
blob - ecb30578057b82335c755ebafb9d9c1fdd24cf97
blob + b0990fa5496b65df45995ab15153323795171ee9
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
const char *, int);
static const struct got_error *gotweb_render_blame(struct request *);
static const struct got_error *gotweb_render_summary(struct request *);
-static const struct got_error *gotweb_render_tags(struct request *);
static void gotweb_free_querystring(struct querystring *);
static void gotweb_free_repo_dir(struct repo_dir *);
goto done;
break;
case TAGS:
- error = gotweb_render_tags(c);
+ error = got_get_repo_tags(c, srv->max_commits_display);
if (error) {
log_warnx("%s: %s", __func__, error->msg);
goto err;
}
+ if (gotweb_render_tags(c->tp) == -1)
+ goto done;
break;
case TREE:
error = got_get_repo_commits(c, 1);
const struct got_error *error = NULL;
struct got_reflist_head refs;
struct transport *t = c->t;
+ struct querystring *qs = t->qs;
struct got_repository *repo = t->repo;
struct server *srv = c->srv;
int r;
goto done;
if (gotweb_render_briefs(c->tp) == -1)
- goto done;
-
- error = gotweb_render_tags(c);
- if (error) {
- log_warnx("%s: %s", __func__, error->msg);
goto done;
- }
- gotweb_render_branches(c->tp, &refs);
-done:
- got_ref_list_free(&refs);
- return error;
-}
-
-static const struct got_error *
-gotweb_render_tags(struct request *c)
-{
- const struct got_error *error = NULL;
- struct server *srv = c->srv;
- struct transport *t = c->t;
- struct querystring *qs = t->qs;
-
- if (qs->action == BRIEFS) {
- qs->action = TAGS;
- error = got_get_repo_tags(c, D_MAXSLCOMMDISP);
- } else
- error = got_get_repo_tags(c, srv->max_commits_display);
+ qs->action = TAGS;
+ error = got_get_repo_tags(c, D_MAXSLCOMMDISP);
if (error)
goto done;
- if (gotweb_render_tags_tmpl(c->tp) == -1)
+ if (gotweb_render_tags(c->tp) == -1)
goto done;
+ gotweb_render_branches(c->tp, &refs);
done:
+ got_ref_list_free(&refs);
return error;
}
blob - 01a426c9ded760150f5157900a24d3874a0f178d
blob + c625c27f2bee1409fe6562219936a8d0e9948a55
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
int gotweb_render_commits(struct template *);
int gotweb_render_blob(struct template *, struct got_blob_object *);
int gotweb_render_tree(struct template *);
-int gotweb_render_tags_tmpl(struct template *);
+int gotweb_render_tags(struct template *);
int gotweb_render_tag(struct template *);
int gotweb_render_diff(struct template *, FILE *);
int gotweb_render_branches(struct template *, struct got_reflist_head *);
blob - 1ee4d93d857e50deb09f255fd23369630dd7c910
blob + 086325e9d628e2ff56488783ccdc6d871efc5089
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
!}
{{ end }}
-{{ define gotweb_render_tags_tmpl(struct template *tp) }}
+{{ define gotweb_render_tags(struct template *tp) }}
{!
struct request *c = tp->tp_arg;
struct transport *t = c->t;