stagit
static git repository generator
git clone https://9o.is/git/stagit.git
commit 3a7d582f35f3623dc05fdb3f518c8d0e39585eaf parent 0f4869f2a33899bc2d8848dd730a73bfb3b40673 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 5 Jan 2016 21:42:10 +0100 make hunk line itself a link Diffstat:
| M | stagit.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stagit.c b/stagit.c @@ -409,9 +409,9 @@ printshowfile(struct commitinfo *ci) if (git_patch_get_hunk(&hunk, &nhunklines, patch, j)) break; - fputs("<span class=\"h\">", fp); + fprintf(fp, "<a href=\"#h%zu\" id=\"h%zu\" class=\"h\">", j, j); xmlencode(fp, hunk->header, hunk->header_len); - fputs("</span>", fp); + fputs("</a>", fp); for (k = 0; ; k++) { if (git_patch_get_line_in_hunk(&line, patch, j, k))