aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2016-01-05 21:04:07 +0100
committerHiltjo Posthuma <[email protected]>2016-01-05 21:04:07 +0100
commit4f318941d086371f4e87f1e7b96f1c029f8766c2 (patch)
tree19636585b7ab41139955fc2abf96d6a9f512ddff
parent200ccad8b566c3705f3d3e5dd7d5456be85e6900 (diff)
downloadstagit-4f318941d086371f4e87f1e7b96f1c029f8766c2.tar.gz
stagit-4f318941d086371f4e87f1e7b96f1c029f8766c2.zip
revert log.html to log/head.html change
Diffstat (limited to '')
-rw-r--r--stagit-index.c2
-rw-r--r--stagit.12
-rw-r--r--stagit.c9
3 files changed, 8 insertions, 5 deletions
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("<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
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("</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 = "";