revert log.html to log/head.html change

This commit is contained in:
Hiltjo Posthuma 2016-01-05 21:04:07 +01:00
parent 200ccad8b5
commit 4f318941d0
3 changed files with 8 additions and 5 deletions

View file

@ -145,7 +145,7 @@ writelog(FILE *fp)
fputs("<tr><td><a href=\"", fp); fputs("<tr><td><a href=\"", fp);
xmlencode(fp, name, strlen(name)); xmlencode(fp, name, strlen(name));
fputs("/log/HEAD.html\">", fp); fputs("/log.html\">", fp);
xmlencode(fp, name, strlen(name)); xmlencode(fp, name, strlen(name));
fputs("</a></td><td>", fp); fputs("</a></td><td>", fp);
xmlencode(fp, description, strlen(description)); xmlencode(fp, description, strlen(description));

View file

@ -17,7 +17,7 @@ to the current directory. The following files will be written:
Atom XML feed Atom XML feed
.It files.html .It files.html
List of files in the latest HEAD commit, linking to the file. List of files in the latest HEAD commit, linking to the file.
.It log/HEAD.html .It log.html
List of commits in order of most recent to old of the commits (top to bottom), List of commits in order of most recent to old of the commits (top to bottom),
each commit links to a page with a diff and diffstat of the commit. each commit links to a page with a diff and diffstat of the commit.
.It refs.html .It refs.html

View file

@ -263,7 +263,7 @@ writeheader(FILE *fp)
fputs("</a></td></tr>", fp); fputs("</a></td></tr>", fp);
} }
fputs("<tr><td></td><td>\n", fp); fputs("<tr><td></td><td>\n", fp);
fprintf(fp, "<a href=\"%slog/HEAD.html\">Log</a> | ", relpath); fprintf(fp, "<a href=\"%slog.html\">Log</a> | ", relpath);
fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath); fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath);
fprintf(fp, "<a href=\"%srefs.html\">Refs/branches</a>", relpath); fprintf(fp, "<a href=\"%srefs.html\">Refs/branches</a>", relpath);
if (hasreadme) if (hasreadme)
@ -463,8 +463,10 @@ writelog(FILE *fp, const char *branch)
fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td>" fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td>"
"<td>Author</td><td>Files</td><td class=\"num\">+</td>" "<td>Author</td><td>Files</td><td class=\"num\">+</td>"
"<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp); "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
relpath = "../";
while (!git_revwalk_next(&id, w)) { while (!git_revwalk_next(&id, w)) {
relpath = "";
if (!(ci = commitinfo_getbyoid(&id))) if (!(ci = commitinfo_getbyoid(&id)))
break; break;
@ -493,6 +495,7 @@ writelog(FILE *fp, const char *branch)
fprintf(fp, "-%zu", ci->delcount); fprintf(fp, "-%zu", ci->delcount);
fputs("</td></tr>\n", fp); fputs("</td></tr>\n", fp);
relpath = "../";
printshowfile(ci); printshowfile(ci);
commitinfo_free(ci); commitinfo_free(ci);
@ -1019,7 +1022,7 @@ main(int argc, char *argv[])
/* log for HEAD */ /* log for HEAD */
mkdir("log", 0755); mkdir("log", 0755);
fp = efopen("log/HEAD.html", "w"); fp = efopen("log.html", "w");
relpath = "../"; relpath = "../";
writeheader(fp); writeheader(fp);
relpath = ""; relpath = "";