Introduction
Introduction Statistics Contact Development Disclaimer Help
tfix: link to line in hunk if a patch has multiple files and hunks - stagit - s…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 86bbe822114c01d9c1bcfe6950463ee1c73e39a5
parent 09a49b3dce9d05d8729fd7bb97efadba69951391
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 27 Apr 2016 16:39:48 +0200
fix: link to line in hunk if a patch has multiple files and hunks
tthanks to lostd for reporting it!
Diffstat:
M stagit.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -394,7 +394,7 @@ printshowfile(FILE *fp, struct commitinfo *ci)
if (git_patch_get_hunk(&hunk, &nhunklines, patch, j))
break;
- fprintf(fp, "<a href=\"#h%zu\" id=\"h%zu\" class=\"h\"…
+ fprintf(fp, "<a href=\"#h%zu-%zu\" id=\"h%zu-%zu\" cla…
xmlencode(fp, hunk->header, hunk->header_len);
fputs("</a>", fp);
t@@ -402,11 +402,11 @@ printshowfile(FILE *fp, struct commitinfo *ci)
if (git_patch_get_line_in_hunk(&line, patch, j…
break;
if (line->old_lineno == -1)
- fprintf(fp, "<a href=\"#h%zu-%zu\" id=…
- j, k, j, k);
+ fprintf(fp, "<a href=\"#h%zu-%zu-%zu\"…
+ i, j, k, i, j, k);
else if (line->new_lineno == -1)
- fprintf(fp, "<a href=\"#h%zu-%zu\" id=…
- j, k, j, k);
+ fprintf(fp, "<a href=\"#h%zu-%zu-%zu\"…
+ i, j, k, i, j, k);
else
fputc(' ', fp);
xmlencode(fp, line->content, line->content_len…
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.