aboutsummaryrefslogtreecommitdiffstats
path: root/ui-log.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-02-16 13:56:09 +0100
committerLars Hjemli <hjemli@gmail.com>2008-02-16 13:56:09 +0100
commitd1f3bbe9d22029f45a77bb938c176ccc0c827d46 (patch)
tree3f1741c012763cbc5485f31377abdd9241fbac6b /ui-log.c
parentb228d4ff82a65fdcd4a7364759fe36a0bdda5978 (diff)
downloadcgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.tar.gz
cgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.tar.bz2
cgit-d1f3bbe9d22029f45a77bb938c176ccc0c827d46.zip
Move cgit_repo into cgit_context
This removes the global variable which is used to keep track of the currently selected repository, and adds a new variable in the cgit_context structure. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui-log.c b/ui-log.c
index a39474b..72e2a4b 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -25,7 +25,7 @@ void count_lines(char *line, int size)
void inspect_files(struct diff_filepair *pair)
{
files++;
- if (cgit_repo->enable_log_linecount)
+ if (ctx.repo->enable_log_linecount)
cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines);
}
@@ -39,14 +39,14 @@ void print_commit(struct commit *commit)
html("</td><td>");
cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,
sha1_to_hex(commit->object.sha1));
- if (cgit_repo->enable_log_filecount) {
+ if (ctx.repo->enable_log_filecount) {
files = 0;
add_lines = 0;
rem_lines = 0;
cgit_diff_commit(commit, inspect_files);
html("</td><td class='right'>");
htmlf("%d", files);
- if (cgit_repo->enable_log_linecount) {
+ if (ctx.repo->enable_log_linecount) {
html("</td><td class='right'>");
htmlf("-%d/+%d", rem_lines, add_lines);
}
@@ -94,9 +94,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
html("<tr class='nohover'><th class='left'>Age</th>"
"<th class='left'>Message</th>");
- if (cgit_repo->enable_log_filecount) {
+ if (ctx.repo->enable_log_filecount) {
html("<th class='right'>Files</th>");
- if (cgit_repo->enable_log_linecount)
+ if (ctx.repo->enable_log_linecount)
html("<th class='right'>Lines</th>");
}
html("<th class='left'>Author</th></tr>\n");