]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-log.c
ui-shared: currenturl should take into account leading slash
[ps-cgit] / ui-log.c
index ad2f5fcd8056ee546be136041ba70cb87517cf9e..32b4c4734d0cc26b457fc45c26d0fd8f31089e62 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -12,7 +12,7 @@
 #include "ui-shared.h"
 #include "argv-array.h"
 
-int files, add_lines, rem_lines;
+static int files, add_lines, rem_lines;
 
 /*
  * The list of available column colors in the commit graph.
@@ -56,11 +56,11 @@ static void inspect_files(struct diff_filepair *pair)
 
 void show_commit_decorations(struct commit *commit)
 {
-       struct name_decoration *deco;
+       const struct name_decoration *deco;
        static char buf[1024];
 
        buf[sizeof(buf) - 1] = 0;
-       deco = lookup_decoration(&name_decoration, &commit->object);
+       deco = get_name_decoration(&commit->object);
        html("<span class='decoration'>");
        while (deco) {
                if (starts_with(deco->name, "refs/heads/")) {
@@ -71,11 +71,11 @@ void show_commit_decorations(struct commit *commit)
                }
                else if (starts_with(deco->name, "tag: refs/tags/")) {
                        strncpy(buf, deco->name + 15, sizeof(buf) - 1);
-                       cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
+                       cgit_tag_link(buf, NULL, "tag-deco", buf);
                }
                else if (starts_with(deco->name, "refs/tags/")) {
                        strncpy(buf, deco->name + 10, sizeof(buf) - 1);
-                       cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
+                       cgit_tag_link(buf, NULL, "tag-deco", buf);
                }
                else if (starts_with(deco->name, "refs/remotes/")) {
                        if (!ctx.repo->enable_remote_branches)