]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-tree.c
global: make 'char *path' const where possible
[cgit.git] / ui-tree.c
index e6b3074faa964e7051674bdf75adcf7dfe85c262..314ac5299fc5dca99949d2cb24394c52fb2c91d5 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -84,7 +84,7 @@ static void print_binary_buffer(char *buf, unsigned long size)
        html("</table>\n");
 }
 
-static void print_object(const struct object_id *oid, char *path, const char *basename, const char *rev)
+static void print_object(const struct object_id *oid, const char *path, const char *basename, const char *rev)
 {
        enum object_type type;
        char *buf;
@@ -177,7 +177,7 @@ static void write_tree_link(const struct object_id *oid, char *name,
                cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, rev,
                               fullpath->buf);
 
-               tree = lookup_tree(&tree_ctx.oid);
+               tree = lookup_tree(the_repository, &tree_ctx.oid);
                if (!tree)
                        return;
 
@@ -279,7 +279,7 @@ static void ls_tail(void)
        cgit_print_layout_end();
 }
 
-static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_context *walk_tree_ctx)
+static void ls_tree(const struct object_id *oid, const char *path, struct walk_tree_context *walk_tree_ctx)
 {
        struct tree *tree;
        struct pathspec paths = {
@@ -359,7 +359,7 @@ void cgit_print_tree(const char *rev, char *path)
                        "Invalid revision name: %s", rev);
                return;
        }
-       commit = lookup_commit_reference(&oid);
+       commit = lookup_commit_reference(the_repository, &oid);
        if (!commit || parse_commit(commit)) {
                cgit_print_error_page(404, "Not found",
                        "Invalid commit reference: %s", rev);