stagit

static git page generator  https://git.ce9e.org
git clone https://git.ce9e.org/stagit.git

commit
bd1c2cf582bf4d98cdac35a57665197917057dfb
parent
c2d6e06ab15c5e36bf0338f44d7429a20782efa0
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2020-03-26 16:09
rm submodules

Diffstat

M stagit.c 17 -----------------

1 files changed, 0 insertions, 17 deletions


diff --git a/stagit.c b/stagit.c

@@ -61,7 +61,6 @@ static char *name = "";
   61    61 static char *strippedname = "";
   62    62 static char description[255];
   63    63 static char cloneurl[1024];
   64    -1 static char *submodules;
   65    64 static char *licensefiles[] = { "HEAD:LICENSE", "HEAD:LICENSE.md", "HEAD:COPYING" };
   66    65 static char *license;
   67    66 static char *readmefiles[] = { "HEAD:README", "HEAD:README.md" };
@@ -120,7 +119,6 @@ commitinfo_getstats(struct commitinfo *ci)
  120   119 
  121   120 	git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION);
  122   121 	opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH |
  123    -1 	              GIT_DIFF_IGNORE_SUBMODULES |
  124   122 		      GIT_DIFF_INCLUDE_TYPECHANGE;
  125   123 	if (git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, &opts))
  126   124 		goto err;
@@ -376,9 +374,6 @@ writeheader(FILE *fp, const char *title)
  376   374 	fputs("<tr><td></td><td>\n", fp);
  377   375 	fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath);
  378   376 	fprintf(fp, "<a href=\"%slog.html\">Log</a>", relpath);
  379    -1 	if (submodules)
  380    -1 		fprintf(fp, " | <a href=\"%sfile/%s.html\">Submodules</a>",
  381    -1 		        relpath, submodules);
  382   377 	if (license)
  383   378 		fprintf(fp, " | <a href=\"%sfile/%s.html\">LICENSE</a>",
  384   379 		        relpath, license);
@@ -863,7 +858,6 @@ int
  863   858 writefilestree(FILE *fp, git_tree *tree, const char *path)
  864   859 {
  865   860 	const git_tree_entry *entry = NULL;
  866    -1 	git_submodule *module = NULL;
  867   861 	git_object *obj = NULL;
  868   862 	git_off_t filesize;
  869   863 	const char *entryname;
@@ -916,12 +910,6 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
  916   910 				fprintf(fp, "%juB", (uintmax_t)filesize);
  917   911 			fputs("</td></tr>\n", fp);
  918   912 			git_object_free(obj);
  919    -1 		} else if (!git_submodule_lookup(&module, repo, entryname)) {
  920    -1 			fprintf(fp, "<tr><td>m---------</td><td><a href=\"%sfile/.gitmodules.html\">",
  921    -1 				relpath);
  922    -1 			xmlencode(fp, entrypath, strlen(entrypath));
  923    -1 			git_submodule_free(module);
  924    -1 			fputs("</a></td><td class=\"num\" align=\"right\"></td></tr>\n", fp);
  925   913 		}
  926   914 	}
  927   915 
@@ -1072,11 +1060,6 @@ main(int argc, char *argv[])
 1072  1060 		git_object_free(obj);
 1073  1061 	}
 1074  1062 
 1075    -1 	if (!git_revparse_single(&obj, repo, "HEAD:.gitmodules") &&
 1076    -1 	    git_object_type(obj) == GIT_OBJ_BLOB)
 1077    -1 		submodules = ".gitmodules";
 1078    -1 	git_object_free(obj);
 1079    -1 
 1080  1063 	/* log for HEAD */
 1081  1064 	fp = efopen("log.html", "w");
 1082  1065 	relpath = "";