commit - 55e464000af0f8e2e4074d6cb565da76f81fe698
commit + bf4484a3a9b50a9bc85902b6fd72003f40c950c2
blob - d682a07e742bfd803a29726b3d532689d7855d99
blob + eb0a376938133f8b43f6010c1d94dcaedfc058ce
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
goto done;
}
- if (gw_trans->page > 0) {
+ if (gw_trans->page > 0 && gw_trans->prev_id) {
if (asprintf(&href_prev,
"?path=%s&page=%d&action=commits&commit=%s&prev=%s",
gw_trans->repo_name, gw_trans->page - 1,
goto done;
}
- if (gw_trans->page > 0) {
+ if (gw_trans->page > 0 && gw_trans->prev_id) {
if (asprintf(&href_prev,
"?path=%s&page=%d&action=briefs&commit=%s&prev=%s",
gw_trans->repo_name, gw_trans->page - 1,
error = got_object_open_as_commit(&commit, gw_trans->repo, id);
if (error)
goto done;
- if (limit == 1 && chk_multi == 0) {
+ if (limit == 1 && chk_multi == 0 &&
+ gw_trans->gw_conf->got_max_commits_display != 1) {
error = gw_get_commit(gw_trans, header, commit, id);
if (error)
goto done;