itweak style of showing submodules - 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 375d41dcce94106460f1b3855ebb295ccb138593 /scm/stagit-gopher/commit/375d41dcce94106460f1b3855ebb295ccb138593.gph bitreich.org 70 1parent 571076b419daec91efb5e5d39dd17066e43805bc /scm/stagit-gopher/commit/571076b419daec91efb5e5d39dd17066e43805bc.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Fri, 29 Apr 2016 12:32:36 +0200 Err bitreich.org 70 i Err bitreich.org 70 itweak style of showing submodules Err bitreich.org 70 i Err bitreich.org 70 ithis will make it look similar to cgit. show mode as "m---------" Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M stagit.c | 10 ++++++---- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 6 insertions(+), 4 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/stagit.c b/stagit.c /scm/stagit-gopher/file/stagit.c.gph bitreich.org 70 i@@ -654,7 +654,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *branch, const char *path) Err bitreich.org 70 i { Err bitreich.org 70 i const git_tree_entry *entry = NULL; Err bitreich.org 70 i git_submodule *module = NULL; Err bitreich.org 70 i- const char *entryname; Err bitreich.org 70 i+ const char *entryname, *moduleurl; Err bitreich.org 70 i char filepath[PATH_MAX], entrypath[PATH_MAX]; Err bitreich.org 70 i git_object *obj = NULL; Err bitreich.org 70 i git_off_t filesize; Err bitreich.org 70 i@@ -709,10 +709,12 @@ writefilestree(FILE *fp, git_tree *tree, const char *branch, const char *path) Err bitreich.org 70 i fprintf(fp, "%juB", (uintmax_t)filesize); Err bitreich.org 70 i fputs("\n", fp); Err bitreich.org 70 i } else if (git_submodule_lookup(&module, repo, entryname) == 0) { Err bitreich.org 70 i- Err bitreich.org 70 i- fprintf(fp, "@", Err bitreich.org 70 i- git_submodule_url(module)); Err bitreich.org 70 i+ moduleurl = git_submodule_url(module); Err bitreich.org 70 i+ fprintf(fp, "m---------", Err bitreich.org 70 i+ moduleurl); Err bitreich.org 70 i xmlencode(fp, entrypath, strlen(entrypath)); Err bitreich.org 70 i+ fputs(" @", fp); Err bitreich.org 70 i+ xmlencode(fp, moduleurl, strlen(moduleurl)); Err bitreich.org 70 i fprintf(fp, "0%c", Err bitreich.org 70 i showlinecount ? 'L' : 'B'); Err bitreich.org 70 i git_submodule_free(module); Err bitreich.org 70 .