From 5213546273ee798369ff594ad60077f1bef4655e Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 8 Jun 2021 14:27:44 -0400 Subject: Squashed 'www/git.causal.agency/cgit/' changes from 55fa25ad..5258c297 5258c297 git: update to v2.32.0 6dbbffe0 git: update to v2.31.1 62eb8db4 md2html: use proper formatting for hr d889cae8 git: update to v2.31.0 4ffadc1e git: update to v2.30.1 bd6f5683 tests: t0107: support older and/or non-GNU tar f69626c6 md2html: use sane_lists extension cef27b67 git: update to v2.30.0 b1739247 git: update to v2.29.2 fe99c76e git: update to v2.29.1 adcc4f82 tests: try with commit-graph a1039ab1 tests: do not copy snapshots to /tmp/ a4de0e81 global: replace hard coded hash length 779631c6 global: replace references to 'sha1' with 'oid' 629659d2 git: update to v2.29.0 205837d4 git: update to v2.28.0 f780396c git: update to v2.27.0 0462f08d git: update to v2.26.0 git-subtree-dir: www/git.causal.agency/cgit git-subtree-split: 5258c297ba6fb604ae1415fbc19a3fe42457e49e --- ui-blob.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'ui-blob.c') diff --git a/ui-blob.c b/ui-blob.c index f76c641e..c10ae42e 100644 --- a/ui-blob.c +++ b/ui-blob.c @@ -19,7 +19,7 @@ struct walk_tree_context { }; static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -56,9 +56,9 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only) goto done; if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT) goto done; - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)), - "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, + repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)), + &paths, walk_tree, &walk_tree_ctx); done: free(path_items.match); @@ -92,10 +92,8 @@ int cgit_print_file(char *path, const char *head, int file_only) type = oid_object_info(the_repository, &oid, &size); if (type == OBJ_COMMIT) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, &paths, walk_tree, - &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.found_path) return -1; type = oid_object_info(the_repository, &oid, &size); @@ -151,10 +149,8 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl if ((!hex) && type == OBJ_COMMIT && path) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, &paths, walk_tree, - &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); type = oid_object_info(the_repository, &oid, &size); } -- cgit 1.4.1