]> git.armaanb.net Git - stagit.git/commitdiff
revert log.html to log/head.html change
authorHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 5 Jan 2016 20:04:07 +0000 (21:04 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Tue, 5 Jan 2016 20:04:07 +0000 (21:04 +0100)
stagit-index.c
stagit.1
stagit.c

index 9e2b2c0fc618dc993bf8ed8b398709454c222fc4..356f08c316733a61d5bee911f5faef9c3436ef17 100644 (file)
@@ -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));
index 20035376aafed46fb3f2771473f7feb32d6f07a0..a8c65ebe15562352adbdfeb04e50d2ccc01e1645 100644 (file)
--- a/stagit.1
+++ b/stagit.1
@@ -17,7 +17,7 @@ to the current directory. The following files will be written:
 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
index 28be94c90c99fb521c8abb93eb2f60eee4b9a3a7..aad7386cc6827a2ab92393ad068cd47937d30bba 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -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)
@@ -463,8 +463,10 @@ writelog(FILE *fp, const char *branch)
        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 class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
-       relpath = "../";
+
        while (!git_revwalk_next(&id, w)) {
+               relpath = "";
+
                if (!(ci = commitinfo_getbyoid(&id)))
                        break;
 
@@ -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);
@@ -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 = "";