stagit: fix hunk header, thanks uggedal for reporting! - stagit-gopher - A git … | |
git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2h… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit a89e756c9e59d41cb1e392616333be50b3960c71 | |
parent 122af5015df461ee21f8543f1f503c884ef334c2 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Mon, 4 Jan 2016 23:41:40 +0100 | |
stagit: fix hunk header, thanks uggedal for reporting! | |
Diffstat: | |
M stagit.c | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/stagit.c b/stagit.c | |
@@ -409,7 +409,9 @@ printshowfile(struct commitinfo *ci) | |
if (git_patch_get_hunk(&hunk, &nhunklines, patch, j)) | |
break; | |
- fprintf(fp, "<span class=\"h\">%s</span>\n", hunk->hea… | |
+ fputs("<span class=\"h\">", fp); | |
+ xmlencode(fp, hunk->header, strcspn(hunk->header, "\n"… | |
+ fputs("</span>", fp); | |
for (k = 0; ; k++) { | |
if (git_patch_get_line_in_hunk(&line, patch, j… |