]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-log.c
shared: make cgit_diff_tree_cb public
[ps-cgit] / ui-log.c
index 657ff3cb76a835ae090452669c05ec49d904fc23..8028b27a0679f006ffae5a724d307b8e3bc73e6e 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -12,7 +12,7 @@
 #include "ui-shared.h"
 #include "argv-array.h"
 
 #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.
 
 /*
  * The list of available column colors in the commit graph.
@@ -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);
                }
                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);
                }
                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)
                }
                else if (starts_with(deco->name, "refs/remotes/")) {
                        if (!ctx.repo->enable_remote_branches)
@@ -249,11 +249,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
 
 static const char *disambiguate_ref(const char *ref, int *must_free_result)
 {
 
 static const char *disambiguate_ref(const char *ref, int *must_free_result)
 {
-       unsigned char sha1[20];
+       struct object_id oid;
        struct strbuf longref = STRBUF_INIT;
 
        strbuf_addf(&longref, "refs/heads/%s", ref);
        struct strbuf longref = STRBUF_INIT;
 
        strbuf_addf(&longref, "refs/heads/%s", ref);
-       if (get_sha1(longref.buf, sha1) == 0) {
+       if (get_sha1(longref.buf, oid.hash) == 0) {
                *must_free_result = 1;
                return strbuf_detach(&longref, NULL);
        }
                *must_free_result = 1;
                return strbuf_detach(&longref, NULL);
        }