commit - 63ee0dcac032703b9160148e3bef4e2af5a4cb11
commit + 833eae2911c004d4184a5d629403327fb85f9b07
blob - e4641cc53d66a2ccbf9d8504835fe0896984881d
blob + 576258d3e841036bb8ed701120d7377a2608de0a
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
if (error)
goto done;
- /* blame header */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"blame_header_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* blame */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"blame", KATTR__MAX);
if (kerr != KCGI_OK)
if (error)
goto done;
- /* diff header */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"diff_header_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* diff */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"diff", KATTR__MAX);
if (kerr != KCGI_OK)
if (error)
goto done;
- /* diff content close */
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
if (kerr != KCGI_OK)
goto done;
if (error)
goto done;
- /* commit content */
TAILQ_FOREACH(n_header, &gw_trans->gw_headers, entry) {
- /* commit line */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"commits_line_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* dotted line */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"dotted_line", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* commit */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"commit", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* navs */
if (asprintf(&href_diff, "?path=%s&action=diff&commit=%s",
gw_trans->repo_name, n_header->commit_id) == -1) {
error = got_error_from_errno("asprintf");
if (error)
goto done;
- /* briefs wrapper */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "briefs_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
goto done;
- /* briefs age */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "briefs_age", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* briefs author */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "briefs_author", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* briefs log */
if (asprintf(&href_diff, "?path=%s&action=diff&commit=%s",
gw_trans->repo_name, n_header->commit_id) == -1) {
error = got_error_from_errno("asprintf");
if (kerr != KCGI_OK)
goto done;
- /* build diff nav */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "navs_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* build tree nav */
if (asprintf(&href_blob, "?path=%s&action=tree&commit=%s",
gw_trans->repo_name, n_header->commit_id) == -1) {
error = got_error_from_errno("asprintf");
if (kerr != KCGI_OK)
goto done;
- /* dotted line */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "dotted_line", KATTR__MAX);
if (kerr != KCGI_OK)
/* unveil is applied with gw_briefs below */
- /* summary wrapper */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"summary_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
return gw_kcgi_error(kerr);
- /* description */
if (gw_trans->gw_conf->got_show_repo_description &&
gw_trans->gw_dir->description != NULL &&
(strcmp(gw_trans->gw_dir->description, "") != 0)) {
goto done;
}
- /* repo owner */
if (gw_trans->gw_conf->got_show_repo_owner &&
gw_trans->gw_dir->owner != NULL) {
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
goto done;
}
- /* last change */
if (gw_trans->gw_conf->got_show_repo_age) {
error = gw_get_repo_age(&age, gw_trans, gw_trans->gw_dir->path,
"refs/heads", TM_LONG);
}
}
- /* cloneurl */
if (gw_trans->gw_conf->got_show_repo_cloneurl &&
gw_trans->gw_dir->url != NULL &&
(strcmp(gw_trans->gw_dir->url, "") != 0)) {
goto done;
}
- /* close summary wrapper */
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
if (kerr != KCGI_OK)
goto done;
- /* commit briefs header */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"briefs_title_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (error)
goto done;
- /* tags */
error = gw_output_repo_tags(gw_trans, NULL, D_MAXSLCOMMDISP,
TAGBRIEF);
if (error)
goto done;
- /* heads */
error = gw_output_repo_heads(gw_trans);
done:
free(age);
if (error)
goto done;
- /* tree header */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"tree_header_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* tree */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"tree", KATTR__MAX);
if (kerr != KCGI_OK)
if (error)
goto done;
- /* tree content close */
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
done:
got_ref_list_free(&header->refs);
if (error)
goto done;
- /* tag header */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"tag_header_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)
if (kerr != KCGI_OK)
goto done;
- /* tag */
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"tree", KATTR__MAX);
if (kerr != KCGI_OK)
if (error)
goto done;
- /* tag content close */
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
done:
got_ref_list_free(&header->refs);
if (a->gw_trans->repo_folder == NULL)
goto err;
- /* blame line */
kerr = khtml_attr(a->gw_trans->gw_html_req, KELEM_DIV, KATTR_ID,
"blame_wrapper", KATTR__MAX);
if (kerr != KCGI_OK)