| @@ -636,9 +636,13 @@ printshowfile(FILE *fp, struct commitinfo *ci)
patch = ci->deltas[i]->patch;
delta = git_patch_get_delta(patch);
/* NOTE: only links to new path */
- fprintf(fp, "[1|diff --git a/%s b/%s",
- delta->old_file.path, delta->new_file.path);
- fprintf(fp, "|%s/file/%s.gph|server|port]\n", relpath, delta->new_file.path);
+ fputs("[1|diff --git a/", fp);
+ gphlink(fp, delta->old_file.path, strlen(delta->old_file.path));
+ fputs(" b/", fp);
+ gphlink(fp, delta->new_file.path, strlen(delta->new_file.path));
+ fprintf(fp, "|%s/file/", relpath);
+ gphlink(fp, delta->new_file.path, strlen(delta->new_file.path));
+ fputs(".gph|server|port]\n", fp);
/* check binary data */
if (delta->flags & GIT_DIFF_FLAG_BINARY) {
@@ -968,7 +972,8 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
fprintf(fp, "%7dL", lc);
else
fprintf(fp, "%7juB", (uintmax_t)filesize);
- fprintf(fp, "|%s/%s", relpath, filepath);
+ fprintf(fp, "|%s/", relpath);
+ gphlink(fp, filepath, strlen(filepath));
fputs("|server|port]\n", fp);
git_object_free(obj);
} else if (!git_submodule_lookup(&module, repo, entryname)) { |