tfix relpath for files, small cleanup - stagit - static git page generator
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 9d264890845398cf3b931b63f629c2c42a7f843d
parent 9b100464647ccbef09e5fe9f6e41e793c93f9753
Author: Hiltjo Posthuma 
Date:   Mon,  7 Dec 2015 19:01:40 +0100

fix relpath for files, small cleanup

Diffstat:
  M urmoms.c                            |      22 ++++++++++++----------

1 file changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/urmoms.c b/urmoms.c
t@@ -332,13 +332,18 @@ writelog(FILE *fp)
         git_revwalk_push_head(w);
 
         /* TODO: also make "expanded" log ? (with message body) */
-        i = 0;
-        fputs(""
-              "", fp);
+        i = 0; /* DEBUG: to limit commits */
+        fputs("
SummaryAuthorAgeFiles+-
\n" + "\n\n", fp); while (!git_revwalk_next(&id, w)) { + /* DEBUG */ + if (i++ > 100) + break; + + relpath = ""; + if (git_commit_lookup(&commit, repo, &id)) return 1; /* TODO: error */ - if ((error = git_commit_parent(&parent, commit, 0))) continue; /* TODO: handle error */ if ((error = git_commit_tree(&commit_tree, commit))) t@@ -379,20 +384,17 @@ writelog(FILE *fp) fprintf(fp, "+%zu", nadd); fputs("", fp); + fputs("\n", fp); + relpath = "../"; printshowfile(commit); git_diff_free(diff); git_commit_free(commit); - - /* DEBUG */ - i++; - if (i > 100) - break; } fprintf(fp, "
Commit messageAuthorAgeFiles+-
", fp); fprintf(fp, "-%zu", ndel); - fputs("
"); git_revwalk_free(w); + relpath = ""; return 0; }