]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-log.c
cgit.c: generate repo.snapshots in print_repo()
[cgit.git] / ui-log.c
index c3757dd0131d75c2764dc0a0931a57085b7fc8b5..0b37785c3c2a2c396d7cdf3fcac70cce1e20aff2 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -26,9 +26,14 @@ void count_lines(char *line, int size)
 
 void inspect_files(struct diff_filepair *pair)
 {
+       unsigned long old_size = 0;
+       unsigned long new_size = 0;
+       int binary = 0;
+
        files++;
        if (ctx.repo->enable_log_linecount)
-               cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines);
+               cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size,
+                               &new_size, &binary, count_lines);
 }
 
 void show_commit_decorations(struct commit *commit)
@@ -48,6 +53,10 @@ void show_commit_decorations(struct commit *commit)
                        strncpy(buf, deco->name + 15, sizeof(buf) - 1);
                        cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
                }
+               else if (!prefixcmp(deco->name, "refs/tags/")) {
+                       strncpy(buf, deco->name + 10, sizeof(buf) - 1);
+                       cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
+               }
                else if (!prefixcmp(deco->name, "refs/remotes/")) {
                        strncpy(buf, deco->name + 13, sizeof(buf) - 1);
                        cgit_log_link(buf, NULL, "remote-deco", NULL,
@@ -165,7 +174,8 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
              "<th class='left'>Commit message");
        if (pager) {
                html(" (");
-               cgit_log_link("toggle", NULL, NULL, ctx.qry.head, ctx.qry.sha1,
+               cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL,
+                             NULL, ctx.qry.head, ctx.qry.sha1,
                              ctx.qry.path, ctx.qry.ofs, ctx.qry.grep,
                              ctx.qry.search, ctx.qry.showmsg ? 0 : 1);
                html(")");