commit - bd275801bc2b5b72d9449d2690dbeceb04a82ea7
commit + 52f8346cd279aba100d9c5f769dfb36df44d7d17
blob - b47bb06855c6bf1b58dd86dcff7bc0b43f6e02a3
blob + a9b51520e570e98dd668b7021ae5e4b37e7f2265
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
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");
+ goto done;
+ }
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "briefs_log", KATTR__MAX);
if (kerr != KCGI_OK)
newline = strchr(n_header->commit_msg, '\n');
if (newline)
*newline = '\0';
+ kerr = khtml_attr(gw_trans->gw_html_req, KELEM_A,
+ KATTR_HREF, href_diff, KATTR__MAX);
+ if (kerr != KCGI_OK)
+ goto done;
kerr = khtml_puts(gw_trans->gw_html_req, n_header->commit_msg);
if (kerr != KCGI_OK)
goto done;
- kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
+ kerr = khtml_closeelem(gw_trans->gw_html_req, 2);
if (kerr != KCGI_OK)
goto done;
KATTR_ID, "navs", KATTR__MAX);
if (kerr != KCGI_OK)
goto done;
- 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");
- goto done;
- }
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_A,
KATTR_HREF, href_diff, KATTR__MAX);
if (kerr != KCGI_OK)