My pretty neat website
git clone git://soophie.de/soso
blob: 6194a29461af5220d4948e9bca6ec6e914d14b51 (1321 bytes)[raw]
1
% #include "src/duc_macro.h" %2
% #include "src/module/git_repo.h" %3
% #include "src/module/git_repo_log.h" %5
% DUC_TEMPLDEF(6
duc_git_repo_log,7
git_repo_t *repo;8
git_repo_commit_t *commit_list;9
size_t commit_list_len;10
) %12
<p>% NUMBER(ctx->commit_list_len) % commit% if (ctx->commit_list_len != 1) { %s% } %</p>13
<ul class="row-list list--log">14
<li class="row row--head">15
<span class="col col--oid">OID</span>16
<span class="col col--time">TIME</span>17
<span class="col col--message">MESSAGE</span>18
<span class="col col--author">AUTHOR</span>19
</li>20
% for (size_t i = 0; i < ctx->commit_list_len; i++) {21
git_repo_commit_t *commit = &ctx->commit_list[i];22
%23
<li class="row">24
<span class="col col--oid" title="% STRING(commit->oid) %"><a href="?ref=% STRING(commit->oid) %">% PRINTF("%%.7s", commit->oid) %</a></span>25
<span class="col col--time">% FORMAT_TIME(&commit->time, "%%Y-%%m-%%d") %</span>26
<span class="col col--message" title="% STRING(commit->message) %"><a href="/git/% STRING(ctx->repo->meta.name) %/commit?% if (ctx->repo->ref) { %ref=% STRING(ctx->repo->ref->oid) %&% } %oid=% STRING(commit->oid) %">% STRING(commit->summary) %</a></span>27
<span class="col col--author">% STRING(commit->author_name) %</span>28
</li>29
% } %30
</ul>32
% DUC_ENDTEMPL %