istagit-index: Strip per repo .git suffix from generated index - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit f631d4ce702893c2207b1a12f2c048829c5f5ac7 /scm/stagit-gopher/commit/f631d4ce702893c2207b1a12f2c048829c5f5ac7.gph bitreich.org 70 1parent d045340ea048e3aa45af719caadad413efdfda4d /scm/stagit-gopher/commit/d045340ea048e3aa45af719caadad413efdfda4d.gph bitreich.org 70 hAuthor: sin URL:mailto:sin@2f30.org bitreich.org 70 iDate: Wed, 6 Jan 2016 14:46:40 +0000 Err bitreich.org 70 i Err bitreich.org 70 istagit-index: Strip per repo .git suffix from generated index Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M stagit-index.c | 10 +++++++++- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 9 insertions(+), 1 deletion(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/stagit-index.c b/stagit-index.c /scm/stagit-gopher/file/stagit-index.c.gph bitreich.org 70 i@@ -124,6 +124,7 @@ writefooter(FILE *fp) Err bitreich.org 70 i int Err bitreich.org 70 i writelog(FILE *fp) Err bitreich.org 70 i { Err bitreich.org 70 i+ char *stripped_name, *p; Err bitreich.org 70 i git_commit *commit = NULL; Err bitreich.org 70 i const git_signature *author; Err bitreich.org 70 i git_revwalk *w = NULL; Err bitreich.org 70 i@@ -146,7 +147,14 @@ writelog(FILE *fp) Err bitreich.org 70 i fputs("", fp); Err bitreich.org 70 i- xmlencode(fp, name, strlen(name)); Err bitreich.org 70 i+ Err bitreich.org 70 i+ /* strip .git suffix */ Err bitreich.org 70 i+ if (!(stripped_name = strdup(name))) Err bitreich.org 70 i+ err(1, "strdup"); Err bitreich.org 70 i+ if ((p = strrchr(stripped_name, '.'))) Err bitreich.org 70 i+ *p = '\0'; Err bitreich.org 70 i+ xmlencode(fp, stripped_name, strlen(stripped_name)); Err bitreich.org 70 i+ Err bitreich.org 70 i fputs("", fp); Err bitreich.org 70 i xmlencode(fp, description, strlen(description)); Err bitreich.org 70 i fputs("", fp); Err bitreich.org 70 .