commit - 3ab2c91424750aef75f929402e6a7581a704f36d
commit + d60961d296583c78051ab30aeee8171fd9611aac
blob - df7d335b7261e2e7472a0004b490f669e3a56351
blob + 9eae54b709c09442a47bd69906eaaeb07cedf24a
--- 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 - 47eed11a0ded054e1f08fe6bee4bc4b5af4aea0e
blob + 23e9968ddbd0cb2c3610a66a962d4d36e4732208
--- 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 - 6cf6d4d7e32e66e8dbd1cf8b8d9740fec9fe9ef2
blob + f915e92c66d33c3821c4e30fb4e0860aaa53d2bc
--- 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;