diff --git a/stagit-index.c b/stagit-index.c
index 9e2b2c0..356f08c 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -145,7 +145,7 @@ writelog(FILE *fp)
fputs("
", fp);
+ fputs("/log.html\">", fp);
xmlencode(fp, name, strlen(name));
fputs(" | ", fp);
xmlencode(fp, description, strlen(description));
diff --git a/stagit.1 b/stagit.1
index 2003537..a8c65eb 100644
--- 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
diff --git a/stagit.c b/stagit.c
index 28be94c..aad7386 100644
--- a/stagit.c
+++ b/stagit.c
@@ -263,7 +263,7 @@ writeheader(FILE *fp)
fputs(" |
", fp);
}
fputs(" | \n", fp);
- fprintf(fp, "Log | ", relpath);
+ fprintf(fp, "Log | ", relpath);
fprintf(fp, "Files | ", relpath);
fprintf(fp, "Refs/branches", relpath);
if (hasreadme)
@@ -463,8 +463,10 @@ writelog(FILE *fp, const char *branch)
fputs("\nAge | Commit message | "
"Author | Files | + | "
"- | \n\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("\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 = "";
|