commit - 64d30f49d7bb122247fc1ab03df40670ff210369
commit + e4caa658300a7add4b5ea31badafdbec0dc733f7
blob - 542f0c0f02f83e44d87ede48a28af59748768530
blob + f4a93f9f22c2a2ae93a2bf822794bade8af45b6c
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
if (limit == 1)
chk_multi = 0;
-
- /*
- * XXX: again, see previous message about caching
- */
TAILQ_FOREACH(re, &refs, entry) {
struct repo_tag *new_repo_tag = NULL;
goto done;
if (commit_found == 0 && qs->commit != NULL &&
- strncmp(id_str, qs->commit, strlen(id_str)) != 0)
+ strncmp(id_str, qs->commit, strlen(id_str)) != 0) {
+ TAILQ_REMOVE(&t->repo_tags, new_repo_tag, entry);
+ gotweb_free_repo_tag(new_repo_tag);
continue;
- else
+ } else
commit_found = 1;
- t->tag_count++;
-
/*
* check for one more commit before breaking,
* so we know whether to navigate through briefs
blob - ff01852b75f3531996e1e87a3c719dbe369b65d9
blob + fb2894f0a49e2ecb0e12069bb4354470e9c06e32
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
log_warnx("%s: %s", __func__, error->msg);
goto err;
}
- if (c->t->tag_count == 0) {
+ if (TAILQ_EMPTY(&c->t->repo_tags)) {
error = got_error_msg(GOT_ERR_BAD_OBJ_ID,
"bad commit id");
goto err;
blob - c0047da16df32ddb81665645f2025c12d9cf8250
blob + 59fef09083a448dfb1173969b2c5b5426af439a8
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
unsigned int repos_total;
unsigned int next_disp;
unsigned int prev_disp;
- unsigned int tag_count;
const struct got_error *error;
struct got_blob_object *blob;
int fd;
blob - 6638943209aae86d6f98b5db64e75ad966980813
blob + 9bc9e41186b83a537530e7cfb4e386bdc1bcfb4d
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
{!
struct request *c = tp->tp_arg;
struct transport *t = c->t;
- struct querystring *qs = t->qs;
struct repo_tag *rt;
- int commit_found;
-
- commit_found = qs->commit == NULL;
!}
<header class='subtitle'>
<h2>Tags</h2>
</header>
<div id="tags_content">
- {{ if t->tag_count == 0 }}
+ {{ if TAILQ_EMPTY(&t->repo_tags) }}
<div id="err_content">
This repository contains no tags
</div>
{{ else }}
{{ tailq-foreach rt &t->repo_tags entry }}
- {{ if commit_found || !strcmp(qs->commit, rt->commit_id) }}
- {! commit_found = 1; !}
- {{ render tag_item(tp, rt) }}
- {{ end }}
+ {{ render tag_item(tp, rt) }}
{{ end }}
{{ render gotweb_render_more(tp, TAGS) }}
{{ end }}