iescape gph in paths - stagit-gemini - Stagit for gemini protocol Openbsd Err thinkerwim.openbsd.amsterdam 70 hgit clone git://thinkerwim.org/stagit-gemini.git URL:git://thinkerwim.org/stagit-gemini.git thinkerwim.org 70 1Log /git/stagit-gemini/log.gph thinkerwim.org 70 1Files /git/stagit-gemini/files.gph thinkerwim.org 70 1Refs /git/stagit-gemini/refs.gph thinkerwim.org 70 1README /git/stagit-gemini/file/README.gph thinkerwim.org 70 1LICENSE /git/stagit-gemini/file/LICENSE.gph thinkerwim.org 70 i--- Err thinkerwim.openbsd.amsterdam 70 1commit c37c488c222ae62fa82edecd2391e5dd76de1e23 /git/stagit-gemini/commit/c37c488c222ae62fa82edecd2391e5dd76de1e23.gph thinkerwim.org 70 1parent f8a73285fa1ba57d5815a9c365db13772896ad19 /git/stagit-gemini/commit/f8a73285fa1ba57d5815a9c365db13772896ad19.gph thinkerwim.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org thinkerwim.org 70 iDate: Sun, 17 Mar 2019 15:19:54 +0100 Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iescape gph in paths Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i- escape paths in diff line. Err thinkerwim.openbsd.amsterdam 70 i- escape path in directory selector in files.gph Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 iDiffstat: Err thinkerwim.openbsd.amsterdam 70 i M stagit-gopher.c | 13 +++++++++---- Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i1 file changed, 9 insertions(+), 4 deletions(-) Err thinkerwim.openbsd.amsterdam 70 i--- Err thinkerwim.openbsd.amsterdam 70 1diff --git a/stagit-gopher.c b/stagit-gopher.c /git/stagit-gemini/file/stagit-gopher.c.gph thinkerwim.org 70 i@@ -636,9 +636,13 @@ printshowfile(FILE *fp, struct commitinfo *ci) Err thinkerwim.openbsd.amsterdam 70 i patch = ci->deltas[i]->patch; Err thinkerwim.openbsd.amsterdam 70 i delta = git_patch_get_delta(patch); Err thinkerwim.openbsd.amsterdam 70 i /* NOTE: only links to new path */ Err thinkerwim.openbsd.amsterdam 70 i- fprintf(fp, "[1|diff --git a/%s b/%s", Err thinkerwim.openbsd.amsterdam 70 i- delta->old_file.path, delta->new_file.path); Err thinkerwim.openbsd.amsterdam 70 i- fprintf(fp, "|%s/file/%s.gph|server|port]\n", relpath, delta->new_file.path); Err thinkerwim.openbsd.amsterdam 70 i+ fputs("[1|diff --git a/", fp); Err thinkerwim.openbsd.amsterdam 70 i+ gphlink(fp, delta->old_file.path, strlen(delta->old_file.path)); Err thinkerwim.openbsd.amsterdam 70 i+ fputs(" b/", fp); Err thinkerwim.openbsd.amsterdam 70 i+ gphlink(fp, delta->new_file.path, strlen(delta->new_file.path)); Err thinkerwim.openbsd.amsterdam 70 i+ fprintf(fp, "|%s/file/", relpath); Err thinkerwim.openbsd.amsterdam 70 i+ gphlink(fp, delta->new_file.path, strlen(delta->new_file.path)); Err thinkerwim.openbsd.amsterdam 70 i+ fputs(".gph|server|port]\n", fp); Err thinkerwim.openbsd.amsterdam 70 i Err thinkerwim.openbsd.amsterdam 70 i /* check binary data */ Err thinkerwim.openbsd.amsterdam 70 i if (delta->flags & GIT_DIFF_FLAG_BINARY) { Err thinkerwim.openbsd.amsterdam 70 i@@ -968,7 +972,8 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) Err thinkerwim.openbsd.amsterdam 70 i fprintf(fp, "%7dL", lc); Err thinkerwim.openbsd.amsterdam 70 i else Err thinkerwim.openbsd.amsterdam 70 i fprintf(fp, "%7juB", (uintmax_t)filesize); Err thinkerwim.openbsd.amsterdam 70 i- fprintf(fp, "|%s/%s", relpath, filepath); Err thinkerwim.openbsd.amsterdam 70 i+ fprintf(fp, "|%s/", relpath); Err thinkerwim.openbsd.amsterdam 70 i+ gphlink(fp, filepath, strlen(filepath)); Err thinkerwim.openbsd.amsterdam 70 i fputs("|server|port]\n", fp); Err thinkerwim.openbsd.amsterdam 70 i git_object_free(obj); Err thinkerwim.openbsd.amsterdam 70 i } else if (!git_submodule_lookup(&module, repo, entryname)) { Err thinkerwim.openbsd.amsterdam 70 .