Commit Diff


commit - ecdb50ac822f296f9c26b7dd8cd4b010399b0da5
commit + b2251e6e28d03b19582a716bf2b3e20bb663d037
blob - c9f1d28d7a2f3d015e2dba4755889533dd1c5f94
blob + 79df2ff2984a3bd08bb77442ab360973d9c35cf7
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -267,6 +267,9 @@ gotweb_process_request(struct request *c)
 		}
 		return;
 	case BRIEFS:
+		error = got_get_repo_commits(c, srv->max_commits_display);
+		if (error)
+			goto err;
 		if (gotweb_reply(c, 200, "text/html", NULL) == -1)
 			return;
 		gotweb_render_page(c->tp, gotweb_render_briefs);
@@ -326,6 +329,9 @@ gotweb_process_request(struct request *c)
 			    error->msg);
 			goto err;
 		}
+		error = got_get_repo_commits(c, D_MAXSLCOMMDISP);
+		if (error)
+			goto err;
 		qs->action = TAGS;
 		error = got_get_repo_tags(c, D_MAXSLCOMMDISP);
 		if (error) {
blob - f52efe502eb60cabafe80781a5a40538ce69c415
blob + 5434c5c0715dcf16578744c6bb071b72488515bb
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
@@ -242,9 +242,7 @@ static inline int rss_author(struct template *, char *
 
 {{ define gotweb_render_briefs(struct template *tp) }}
 {!
-	const struct got_error	*error;
 	struct request		*c = tp->tp_arg;
-	struct server		*srv = c->srv;
 	struct transport	*t = c->t;
 	struct querystring	*qs = c->t->qs;
 	struct repo_commit	*rc;
@@ -266,13 +264,6 @@ static inline int rss_author(struct template *, char *
 		.path = repo_dir->name,
 		.headref = qs->headref,
 	};
-
-	if (qs->action == SUMMARY) {
-		error = got_get_repo_commits(c, D_MAXSLCOMMDISP);
-	} else
-		error = got_get_repo_commits(c, srv->max_commits_display);
-	if (error)
-		return -1;
 !}
 <div id="briefs_title_wrapper">
   <div id="briefs_title">Commit Briefs</div>