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
17 files changed:
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,
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);