X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/a2ddc10479ec463708e422ca5ce7ec02c22a7d02..dc3ac3f76077c5d612d42e8beb4878e43acfc58a:/ui-log.c diff --git a/ui-log.c b/ui-log.c index 9d0ec02..4237921 100644 --- a/ui-log.c +++ b/ui-log.c @@ -19,7 +19,8 @@ void count_lines(char *line, int size) void inspect_files(struct diff_filepair *pair) { files++; - cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); + if (cgit_repo->enable_log_linecount) + cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); } void print_commit(struct commit *commit) @@ -39,13 +40,17 @@ void print_commit(struct commit *commit) html_link_open(url, NULL, NULL); html_ntxt(cgit_max_msg_len, info->subject); html_link_close(); - files = 0; - lines = 0; - cgit_diff_commit(commit, inspect_files); - html("
| Date | " - "Message | " - "Files | " - "Lines | " - "Author | Message | "); + + if (cgit_repo->enable_log_filecount) { + html("Files | "); + if (cgit_repo->enable_log_linecount) + html("Lines | "); + } + html("Author | \n"); if (ofs<0) ofs = 0;
|---|