From: Junio C Hamano Date: Tue, 28 Apr 2026 01:22:00 +0000 (+0900) Subject: Merge branch 'ps/setup-wo-the-repository' into seen X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c6d50bae1abccfa1dae11027f4790df7afb6e997;p=thirdparty%2Fgit.git Merge branch 'ps/setup-wo-the-repository' into seen Many uses of the_repository has been updated to use a more appropriate struct repository instance in setup.c codepath. * ps/setup-wo-the-repository: setup: stop using `the_repository` in `init_db()` setup: stop using `the_repository` in `create_reference_database()` setup: stop using `the_repository` in `initialize_repository_version()` setup: stop using `the_repository` in `check_repository_format()` setup: stop using `the_repository` in `upgrade_repository_format()` setup: stop using `the_repository` in `setup_git_directory()` setup: stop using `the_repository` in `setup_git_directory_gently()` setup: stop using `the_repository` in `setup_git_env()` setup: stop using `the_repository` in `set_git_work_tree()` setup: stop using `the_repository` in `setup_work_tree()` setup: stop using `the_repository` in `enter_repo()` setup: stop using `the_repository` in `verify_non_filename()` setup: stop using `the_repository` in `verify_filename()` setup: stop using `the_repository` in `path_inside_repo()` setup: stop using `the_repository` in `prefix_path()` setup: stop using `the_repository` in `is_inside_git_dir()` setup: stop using `the_repository` in `is_inside_worktree()` setup: replace use of `the_repository` in static functions --- c6d50bae1abccfa1dae11027f4790df7afb6e997 diff --cc builtin/sparse-checkout.c index 92d017b81f,d89acbeb53..0863d0fb46 --- a/builtin/sparse-checkout.c +++ b/builtin/sparse-checkout.c @@@ -980,10 -975,10 +981,10 @@@ static int sparse_checkout_clean(int ar OPT_END(), }; - setup_work_tree(); + setup_work_tree(the_repository); if (!cfg->apply_sparse_checkout) die(_("must be in a sparse-checkout to clean directories")); - if (!core_sparse_checkout_cone) + if (!cfg->core_sparse_checkout_cone) die(_("must be in a cone-mode sparse-checkout to clean directories")); argc = parse_options(argc, argv, prefix, diff --cc revision.c index c936a60b7d,9071a38b85..5362616aff --- a/revision.c +++ b/revision.c @@@ -2072,7 -2081,9 +2072,7 @@@ static int handle_dotdot_1(const char * return -1; if (!cant_be_filename) { - verify_non_filename(revs->prefix, full_name); - *dotdot = '.'; - verify_non_filename(the_repository, revs->prefix, arg); - *dotdot = '\0'; ++ verify_non_filename(the_repository, revs->prefix, full_name); } a_obj = parse_object(revs->repo, &a_oid);