| trevert log.html to log/head.html change - stagit - static git page generator | |
| git clone git://src.adamsgaard.dk/stagit | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 4f318941d086371f4e87f1e7b96f1c029f8766c2 | |
| parent 200ccad8b566c3705f3d3e5dd7d5456be85e6900 | |
| Author: Hiltjo Posthuma <[email protected]> | |
| Date: Tue, 5 Jan 2016 21:04:07 +0100 | |
| revert log.html to log/head.html change | |
| Diffstat: | |
| M stagit-index.c | 2 +- | |
| M stagit.1 | 2 +- | |
| M stagit.c | 9 ++++++--- | |
| 3 files changed, 8 insertions(+), 5 deletions(-) | |
| --- | |
| diff --git a/stagit-index.c b/stagit-index.c | |
| t@@ -145,7 +145,7 @@ writelog(FILE *fp) | |
| fputs("<tr><td><a href=\"", fp); | |
| xmlencode(fp, name, strlen(name)); | |
| - fputs("/log/HEAD.html\">", fp); | |
| + fputs("/log.html\">", fp); | |
| xmlencode(fp, name, strlen(name)); | |
| fputs("</a></td><td>", fp); | |
| xmlencode(fp, description, strlen(description)); | |
| diff --git a/stagit.1 b/stagit.1 | |
| t@@ -17,7 +17,7 @@ to the current directory. The following files will be writte… | |
| Atom XML feed | |
| .It files.html | |
| 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), | |
| each commit links to a page with a diff and diffstat of the commit. | |
| .It refs.html | |
| diff --git a/stagit.c b/stagit.c | |
| t@@ -263,7 +263,7 @@ writeheader(FILE *fp) | |
| fputs("</a></td></tr>", 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=\"%srefs.html\">Refs/branches</a>", relpath); | |
| if (hasreadme) | |
| t@@ -463,8 +463,10 @@ writelog(FILE *fp, const char *branch) | |
| fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</… | |
| "<td>Author</td><td>Files</td><td class=\"num\">+</td>" | |
| "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp); | |
| - relpath = "../"; | |
| + | |
| while (!git_revwalk_next(&id, w)) { | |
| + relpath = ""; | |
| + | |
| if (!(ci = commitinfo_getbyoid(&id))) | |
| break; | |
| t@@ -493,6 +495,7 @@ writelog(FILE *fp, const char *branch) | |
| fprintf(fp, "-%zu", ci->delcount); | |
| fputs("</td></tr>\n", fp); | |
| + relpath = "../"; | |
| printshowfile(ci); | |
| commitinfo_free(ci); | |
| t@@ -1019,7 +1022,7 @@ main(int argc, char *argv[]) | |
| /* log for HEAD */ | |
| mkdir("log", 0755); | |
| - fp = efopen("log/HEAD.html", "w"); | |
| + fp = efopen("log.html", "w"); | |
| relpath = "../"; | |
| writeheader(fp); | |
| relpath = ""; |