X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=blobdiff_plain;f=stagit.c;h=a6cfebc043b62d54695612a0482ff097a061fb2e;hp=1fc6c1e592458935fe348ef2a480b0b8018d7fa1;hb=028c7526bac907c91ef8afc6c3ae0f6d424bd229;hpb=bb1d06eb204b1d1135fcddccd14f6306abcd7f72 diff --git a/stagit.c b/stagit.c index 1fc6c1e..a6cfebc 100644 --- a/stagit.c +++ b/stagit.c @@ -532,9 +532,15 @@ 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", - i, relpath, delta->old_file.path, delta->old_file.path, - relpath, delta->new_file.path, delta->new_file.path); + fprintf(fp, "diff --git a/old_file.path, strlen(delta->old_file.path)); + fputs(".html\">", fp); + xmlencode(fp, delta->old_file.path, strlen(delta->old_file.path)); + fprintf(fp, " b/new_file.path, strlen(delta->new_file.path)); + fprintf(fp, ".html\">"); + xmlencode(fp, delta->new_file.path, strlen(delta->new_file.path)); + fprintf(fp, "\n"); /* check binary data */ if (delta->flags & GIT_DIFF_FLAG_BINARY) { @@ -881,7 +887,9 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) fputs("", fp); fputs(filemode(git_tree_entry_filemode(entry)), fp); - fprintf(fp, "", relpath, filepath); + fprintf(fp, "", fp); xmlencode(fp, entrypath, strlen(entrypath)); fputs("", fp); if (lc > 0)