commit d91faf3b4d4dad2a2fb478e472c1355b5cf864a9 from: Christian Weisgerber date: Tue Dec 01 22:53:48 2020 UTC trim repo parameter from tree_view_walk_path(), already set by open_tree_view() ok stsp commit - d86d3b18bf5528157d1125bd8476e36715c0de7f commit + d91faf3b4d4dad2a2fb478e472c1355b5cf864a9 blob - bbb3cc73e7b40155abee1e1ee81c2892084588dc blob + 92120c7cde33afff3cb260a148050015f4d302d9 --- tog/tog.c +++ tog/tog.c @@ -1831,8 +1831,7 @@ tree_view_visit_subtree(struct got_tree_object *subtre static const struct got_error * tree_view_walk_path(struct tog_tree_view_state *s, - struct got_object_id *commit_id, - const char *path, struct got_repository *repo) + struct got_object_id *commit_id, const char *path) { const struct got_error *err = NULL; struct got_tree_object *tree = NULL; @@ -1881,12 +1880,12 @@ tree_view_walk_path(struct tog_tree_view_state *s, break; } - err = got_object_id_by_path(&tree_id, repo, commit_id, + err = got_object_id_by_path(&tree_id, s->repo, commit_id, subpath); if (err) break; - err = got_object_open_as_tree(&tree, repo, tree_id); + err = got_object_open_as_tree(&tree, s->repo, tree_id); free(tree_id); if (err) break; @@ -1938,7 +1937,7 @@ browse_commit_tree(struct tog_view **new_view, int beg if (got_path_is_root_dir(path)) return NULL; - return tree_view_walk_path(s, entry->id, path, repo); + return tree_view_walk_path(s, entry->id, path); } static const struct got_error * @@ -5571,7 +5570,7 @@ cmd_tree(int argc, char *argv[]) goto done; if (!got_path_is_root_dir(in_repo_path)) { error = tree_view_walk_path(&view->state.tree, commit_id, - in_repo_path, repo); + in_repo_path); if (error) goto done; }