commit - 34f1dbc68b77fbde24f252acb391918b148e933f
commit + 21803cc72d1377b8e7d26d94830c713b11fe9f13
blob - 65031bcad382b752fbd9abd334f4674b814cd4c9
blob + 3d14cfc68d6f81f4b93e57c1255f7b5e37dfa1c2
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
{!
struct request *c = tp->tp_arg;
struct transport *t = c->t;
+ struct querystring *qs = t->qs;
FILE *fp = t->fp;
struct repo_commit *rc = TAILQ_FIRST(&t->repo_commits);
char *line = NULL;
size_t linesize = 0;
ssize_t linelen;
+ struct gotweb_url patch_url, tree_url = {
+ .action = TREE,
+ .index_page = -1,
+ .page = -1,
+ .path = qs->path,
+ .commit = rc->commit_id,
+ };
+
+ memcpy(&patch_url, &tree_url, sizeof(patch_url));
+ patch_url.action = PATCH;
!}
<header class="subtitle">
<h2>Commit Diff</h2>
</dd>
<dt>Message:</dt>
<dd class="commit-msg">{{ rc->commit_msg }}</dd>
+ <dt>Actions:</dt>
+ <dd>
+ <a href="{{ render gotweb_render_url(c, &patch_url) }}">
+ Patch
+ </a>
+ {{ " — " | unsafe }}
+ <a href="{{ render gotweb_render_url(c, &tree_url) }}">
+ Tree
+ </a>
+ </dd>
</dl>
</div>
<hr />