Introduction
Introduction Statistics Contact Development Disclaimer Help
ttweak style of showing submodules - stagit - static git page generator
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 375d41dcce94106460f1b3855ebb295ccb138593
parent 571076b419daec91efb5e5d39dd17066e43805bc
Author: Hiltjo Posthuma <[email protected]>
Date: Fri, 29 Apr 2016 12:32:36 +0200
ttweak style of showing submodules
tthis will make it look similar to cgit. show mode as "m---------"
Diffstat:
M stagit.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -654,7 +654,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *branc…
{
const git_tree_entry *entry = NULL;
git_submodule *module = NULL;
- const char *entryname;
+ const char *entryname, *moduleurl;
char filepath[PATH_MAX], entrypath[PATH_MAX];
git_object *obj = NULL;
git_off_t filesize;
t@@ -709,10 +709,12 @@ writefilestree(FILE *fp, git_tree *tree, const char *bra…
fprintf(fp, "%juB", (uintmax_t)filesize);
fputs("</td></tr>\n", fp);
} else if (git_submodule_lookup(&module, repo, entryname) == 0…
-
- fprintf(fp, "<tr><td></td><td><a class=\"module\" href…
- git_submodule_url(module));
+ moduleurl = git_submodule_url(module);
+ fprintf(fp, "<tr><td>m---------</td><td><a class=\"mod…
+ moduleurl);
xmlencode(fp, entrypath, strlen(entrypath));
+ fputs(" @", fp);
+ xmlencode(fp, moduleurl, strlen(moduleurl));
fprintf(fp, "</a></td><td class=\"num\">0%c",
showlinecount ? 'L' : 'B');
git_submodule_free(module);
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.