stagit-responsive

My mobile friendly fork of stagit
Log | Files | Refs | README | LICENSE

commit 8cbf66215f4fde44966f139926e7ce0d1526d436
parent 3bef738a10f66467cd7f6f4bf4c1cf1a3dee4c63
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Sun, 17 May 2020 04:43:59 +0700

refactor: use index.html instead of log.html

index

Diffstat:
Mstagit-index.c | 2+-
Mstagit.c | 8++++----

2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c
@@ -120,7 +120,7 @@ writelog(FILE *fp)
 
 	fputs("<tr><td><a href=\"", fp);
 	xmlencode(fp, stripped_name, strlen(stripped_name));
-	fputs("/log.html\">", fp);
+	fputs("/index.html\">", fp);
 	xmlencode(fp, stripped_name, strlen(stripped_name));
 	fputs("</a></td><td>", fp);
 	xmlencode(fp, description, strlen(description));
diff --git a/stagit.c b/stagit.c
@@ -373,7 +373,7 @@ writeheader(FILE *fp, const char *title)
 		fputs("</a></td></tr>", fp);
 	}
 	fputs("<tr><td></td><td>\n", fp);
-	fprintf(fp, "<a href=\"%slog.html\">Log</a> | ", relpath);
+	fprintf(fp, "<a href=\"%sindex.html\">Log</a> | ", relpath);
 	fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath);
 	fprintf(fp, "<a href=\"%srefs.html\">Refs</a>", relpath);
 	if (submodules)
@@ -636,7 +636,7 @@ writelog(FILE *fp, const git_oid *oid)
 
 		if (!(ci = commitinfo_getbyoid(&id)))
 			break;
-		/* diffstat: for stagit HTML required for the log.html line */
+		/* diffstat: for stagit HTML required for the index.html line */
 		if (commitinfo_getstats(ci) == -1)
 			goto err;
 
@@ -1185,7 +1185,7 @@ main(int argc, char *argv[])
 	git_object_free(obj);
 
 	/* log for HEAD */
-	fp = efopen("log.html", "w");
+	fp = efopen("index.html", "w");
 	relpath = "";
 	mkdir("commit", S_IRWXU | S_IRWXG | S_IRWXO);
 	writeheader(fp, "Log");
@@ -1216,7 +1216,7 @@ main(int argc, char *argv[])
 		writelog(fp, head);
 
 		if (rcachefp) {
-			/* append previous log to log.html and the new cache */
+			/* append previous log to index.html and the new cache */
 			while (!feof(rcachefp)) {
 				n = fread(buf, 1, sizeof(buf), rcachefp);
 				if (ferror(rcachefp))