| Date: Fri, 6 May 2016 11:49:25 +0200
make diffstat files an anchor (jump to delta)
Diffstat:
M stagit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- |
| t@@ -462,7 +462,7 @@ printshowfile(FILE *fp, struct commitinfo *ci)
fputs("Diffstat:\n ", fp);
for (i = 0; i < ci->ndeltas; i++) {
delta = git_patch_get_delta(ci->deltas[i]->patch);
- fputs("", fp);
+ fprintf(fp, " | ", i);
xmlencode(fp, delta->old_file.path, strlen(delta->old_file.path));
if (strcmp(delta->old_file.path, delta->new_file.path)) {
fputs(" -> ", fp);
t@@ -482,7 +482,7 @@ printshowfile(FILE *fp, struct commitinfo *ci)
memset(&linestr, '+', add);
memset(&linestr[add], '-', del);
- fprintf(fp, " | | | %zu | ",
+ fprintf(fp, " | | | %zu | ",
ci->deltas[i]->addcount + ci->deltas[i]->delcount);
fwrite(&linestr, 1, add, fp);
fputs("", fp);
t@@ -499,8 +499,8 @@ printshowfile(FILE *fp, struct commitinfo *ci)
for (i = 0; i < ci->ndeltas; i++) {
patch = ci->deltas[i]->patch;
delta = git_patch_get_delta(patch);
- fprintf(fp, "diff --git a/%s b/%s\n",
- relpath, delta->old_file.path, delta->old_file.path,
+ fprintf(fp, "diff --git a/%s b/%s\n",
+ i, relpath, delta->old_file.path, delta->old_file.path,
relpath, delta->new_file.path, delta->new_file.path);
/* check binary data */ |
|