stagit

revert log.html to log/head.html change

Hiltjo Posthuma contact@arjunchoudhary.com

commit: 88f8558 parent: c999524
3 files changed, 8 insertions(+), 5 deletions(-)
Mstagit-index.c+1-1
Mstagit.1+1-1
Mstagit.c+6-3
M · stagit-index.c +1, -1
1@@ -145,7 +145,7 @@ writelog(FILE *fp)
2 
3 	fputs("<tr><td><a href=\"", fp);
4 	xmlencode(fp, name, strlen(name));
5-	fputs("/log/HEAD.html\">", fp);
6+	fputs("/log.html\">", fp);
7 	xmlencode(fp, name, strlen(name));
8 	fputs("</a></td><td>", fp);
9 	xmlencode(fp, description, strlen(description));
M · stagit.1 +1, -1
1@@ -17,7 +17,7 @@ to the current directory. The following files will be written:
2 Atom XML feed
3 .It files.html
4 List of files in the latest HEAD commit, linking to the file.
5-.It log/HEAD.html
6+.It log.html
7 List of commits in order of most recent to old of the commits (top to bottom),
8 each commit links to a page with a diff and diffstat of the commit.
9 .It refs.html
M · stagit.c +6, -3
 1@@ -263,7 +263,7 @@ writeheader(FILE *fp)
 2 		fputs("</a></td></tr>", fp);
 3 	}
 4 	fputs("<tr><td></td><td>\n", fp);
 5-	fprintf(fp, "<a href=\"%slog/HEAD.html\">Log</a> | ", relpath);
 6+	fprintf(fp, "<a href=\"%slog.html\">Log</a> | ", relpath);
 7 	fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath);
 8 	fprintf(fp, "<a href=\"%srefs.html\">Refs/branches</a>", relpath);
 9 	if (hasreadme)
10@@ -463,8 +463,10 @@ writelog(FILE *fp, const char *branch)
11 	fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td>"
12 		  "<td>Author</td><td>Files</td><td class=\"num\">+</td>"
13 		  "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
14-	relpath = "../";
15+
16 	while (!git_revwalk_next(&id, w)) {
17+		relpath = "";
18+
19 		if (!(ci = commitinfo_getbyoid(&id)))
20 			break;
21 
22@@ -493,6 +495,7 @@ writelog(FILE *fp, const char *branch)
23 		fprintf(fp, "-%zu", ci->delcount);
24 		fputs("</td></tr>\n", fp);
25 
26+		relpath = "../";
27 		printshowfile(ci);
28 
29 		commitinfo_free(ci);
30@@ -1019,7 +1022,7 @@ main(int argc, char *argv[])
31 
32 	/* log for HEAD */
33 	mkdir("log", 0755);
34-	fp = efopen("log/HEAD.html", "w");
35+	fp = efopen("log.html", "w");
36 	relpath = "../";
37 	writeheader(fp);
38 	relpath = "";