Commit Diff


commit - e4caa658300a7add4b5ea31badafdbec0dc733f7
commit + d4982225ffedbeafcf28f1cb9363f4f1c9798512
blob - fb2894f0a49e2ecb0e12069bb4354470e9c06e32
blob + cc06209b1e8c52eb8460afa45b05725c2650d9e2
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -353,7 +353,15 @@ gotweb_process_request(struct request *c)
 		}
 		error = got_get_repo_commits(c, srv->summary_commits_display);
 		if (error)
+			goto err;
+		qs->action = TAGS;
+		error = got_get_repo_tags(c, srv->summary_tags_display);
+		if (error) {
+			log_warnx("%s: got_get_repo_tags: %s", __func__,
+			    error->msg);
 			goto err;
+		}
+		qs->action = SUMMARY;
 		commit = TAILQ_FIRST(&c->t->repo_commits);
 		if (commit && qs->commit == NULL) {
 			qs->commit = strdup(commit->commit_id);
@@ -362,15 +370,7 @@ gotweb_process_request(struct request *c)
 				log_warn("%s: strdup", __func__);
 				goto err;
 			}
-		}
-		qs->action = TAGS;
-		error = got_get_repo_tags(c, srv->summary_tags_display);
-		if (error) {
-			log_warnx("%s: got_get_repo_tags: %s", __func__,
-			    error->msg);
-			goto err;
 		}
-		qs->action = SUMMARY;
 		if (gotweb_reply(c, 200, "text/html", NULL) == -1)
 			return;
 		gotweb_render_page(c->tp, gotweb_render_summary);