Introduction
Introduction Statistics Contact Development Disclaimer Help
fix submodule lookup in bare repos - stagit-gopher - static git page generator …
git clone git://git.codemadness.org/stagit-gopher
Log
Files
Refs
README
LICENSE
---
commit 40f49c4d17d2cacc62c64e5f96522c3c14c40ab9
parent f939dd0767be55df7983178f51c85d3e55054056
Author: Hiltjo Posthuma <[email protected]>
Date: Thu, 6 Aug 2020 18:28:30 +0200
fix submodule lookup in bare repos
Sync fix from stagit.
Patch by kst <[email protected]>, thanks!
Diffstat:
M stagit-gopher.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/stagit-gopher.c b/stagit-gopher.c
@@ -1051,7 +1051,6 @@ int
writefilestree(FILE *fp, git_tree *tree, const char *path)
{
const git_tree_entry *entry = NULL;
- git_submodule *module = NULL;
git_object *obj = NULL;
git_off_t filesize;
const char *entryname;
@@ -1105,13 +1104,13 @@ writefilestree(FILE *fp, git_tree *tree, const char *pa…
gphlink(fp, filepath, strlen(filepath));
fputs("|server|port]\n", fp);
git_object_free(obj);
- } else if (!git_submodule_lookup(&module, repo, entryname)) {
+ } else if (git_tree_entry_type(entry) == GIT_OBJ_COMMIT) {
+ /* commit object in tree is a submodule */
fputs("[1|m--------- ", fp);
utf8pad(buf, sizeof(buf), entrypath, 50, ' ');
gphlink(fp, buf, strlen(buf));
fprintf(fp, "|%s/file/.gitmodules.gph|server|port]\n",…
/* NOTE: linecount omitted */
- git_submodule_free(module);
}
}
You are viewing proxied material from codemadness.org. 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.