it does.
------------------------------------------------------------------
- git_config(git_default_config);
+ repo_config(the_repository, git_default_config);
if (argc != 3)
usage("git cat-file [-t|-s|-e|-p|<type>] <sha1>");
if (get_sha1(argv[2], sha1))
{
git_config_get_string("apply.whitespace", &apply_default_whitespace);
git_config_get_string("apply.ignorewhitespace", &apply_default_ignorewhitespace);
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
}
static int parse_whitespace_option(struct apply_state *state, const char *option)
tar_filter_config("tar.tgz.remote", "true", NULL);
tar_filter_config("tar.tar.gz.command", internal_gzip_command, NULL);
tar_filter_config("tar.tar.gz.remote", "true", NULL);
- git_config(git_tar_config, NULL);
+ repo_config(the_repository, git_tar_config, NULL);
for (i = 0; i < nr_tar_filters; i++) {
/* omit any filters that never had a command configured */
if (tar_filters[i]->filter_command)
{
int err;
- git_config(archive_zip_config, NULL);
+ repo_config(the_repository, archive_zip_config, NULL);
dos_time(&args->time, &zip_date, &zip_time);
int rc;
git_config_get_bool("uploadarchive.allowunreachable", &remote_allow_unreachable);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
describe_status.max_invocations = 1;
ctx.date_mode.type = DATE_NORMAL;
show_usage_with_options_if_asked(argc, argv, usage, options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
am_state_init(&state);
const char *const *opt_usage = cmd_is_annotate ? annotate_opt_usage : blame_opt_usage;
setup_default_color_by_age();
- git_config(git_blame_config, &output_option);
+ repo_config(the_repository, git_blame_config, &output_option);
repo_init_revisions(the_repository, &revs, NULL);
revs.date_mode = blame_date_mode;
revs.diffopt.flags.allow_textconv = 1;
* Try to set sort keys from config. If config does not set any,
* fall back on default (refname) sorting.
*/
- git_config(git_branch_config, &sorting_options);
+ repo_config(the_repository, git_branch_config, &sorting_options);
if (!sorting_options.nr)
string_list_append(&sorting_options, "refname");
OPT_END()
};
- git_config(git_cat_file_config, NULL);
+ repo_config(the_repository, git_cat_file_config, NULL);
batch.buffer_output = -1;
if (!is_bare_repository())
setup_work_tree();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_attr_options,
check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
int num_ignored;
struct dir_struct dir = DIR_INIT;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_ignore_options,
check_ignore_usage, 0);
int i;
struct string_list mailmap = STRING_LIST_INIT_NODUP;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, check_mailmap_options,
check_mailmap_usage, 0);
if (argc == 0 && !use_stdin)
checkout_worker_usage,
checkout_worker_options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, checkout_worker_options,
checkout_worker_usage, 0);
if (argc > 0)
opts->prefix = prefix;
opts->show_progress = -1;
- git_config(git_checkout_config, opts);
+ repo_config(the_repository, git_checkout_config, opts);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
OPT_END()
};
- git_config(git_clean_config, NULL);
+ repo_config(the_repository, git_clean_config, NULL);
argc = parse_options(argc, argv, prefix, options, builtin_clean_usage,
0);
packet_trace_identity("clone");
- git_config(git_clone_config, NULL);
+ repo_config(the_repository, git_clone_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_clone_options,
builtin_clone_usage, 0);
* re-read config after init_db and write_config to pick up any config
* injected by --template and --config, respectively.
*/
- git_config(git_clone_config, NULL);
+ repo_config(the_repository, git_clone_config, NULL);
/*
* If option_reject_shallow is specified from CLI option,
/* This one is special and must be the first one */
if (argc > 1 && starts_with(argv[1], "--command=")) {
command = argv[1] + 10;
- git_config(column_config, (void *)command);
+ repo_config(the_repository, column_config, (void *)command);
} else
- git_config(column_config, NULL);
+ repo_config(the_repository, column_config, NULL);
memset(&copts, 0, sizeof(copts));
copts.padding = 1;
trace2_cmd_mode("write");
- git_config(git_commit_graph_write_config, &opts);
+ repo_config(the_repository, git_commit_graph_write_config, &opts);
argc = parse_options(argc, argv, prefix,
options,
};
struct option *options = parse_options_concat(builtin_commit_graph_options, common_opts);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
disable_replace_refs();
save_commit_buffer = 0;
};
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
show_usage_with_options_if_asked(argc, argv,
commit_tree_usage, options);
{
wt_status_prepare(the_repository, s);
init_diff_ui_defaults();
- git_config(fn, s);
+ repo_config(the_repository, fn, s);
determine_whence(s);
- s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after git_config() */
+ s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after repo_config() */
}
static void rollback_index_files(void)
die(_("editing stdin is not supported"));
if (opts->source.blob)
die(_("editing blobs is not supported"));
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
config_file = opts->source.file ?
xstrdup(opts->source.file) :
repo_git_path(the_repository, "config");
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, opts, count_objects_usage, 0);
/* we do not take arguments other than flags for now */
const char *op;
struct credential c = CREDENTIAL_INIT;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
show_usage_if_asked(argc, argv, usage_msg);
if (argc != 2)
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, describe_usage, 0);
if (abbrev < 0)
abbrev = DEFAULT_ABBREV;
show_usage_if_asked(argc, argv, diff_files_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
show_usage_if_asked(argc, argv, diff_cache_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
show_usage_if_asked(argc, argv, diff_tree_usage);
- git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+ repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
init_diff_ui_defaults();
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
prefix = precompose_argv_prefix(argc, argv, prefix);
repo_init_revisions(the_repository, &rev, prefix);
usage_with_options (fast_export_usage, options);
/* we handle encodings */
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
repo_init_revisions(the_repository, &revs, prefix);
init_revision_sources(&revision_sources);
else if (!git_config_get_int("transfer.unpacklimit", &limit))
unpack_limit = limit;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
static const char fast_import_usage[] =
struct remote_group_data g;
g.name = name; g.list = list;
- git_config(get_remote_group, &g);
+ repo_config(the_repository, get_remote_group, &g);
if (list->nr == prev_nr) {
struct remote *remote = remote_get(name);
if (!remote_is_configured(remote, 0))
free(anon);
}
- git_config(git_fetch_config, &config);
+ repo_config(the_repository, git_fetch_config, &config);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
int ret;
struct fmt_merge_msg_opts opts;
- git_config(fmt_merge_msg_config, NULL);
+ repo_config(the_repository, fmt_merge_msg_config, NULL);
argc = parse_options(argc, argv, prefix, options, fmt_merge_msg_usage,
0);
if (argc > 0)
if (name_objects)
fsck_enable_object_names(&fsck_walk_options);
- git_config(git_fsck_config, &fsck_obj_options);
+ repo_config(the_repository, git_fsck_config, &fsck_obj_options);
prepare_repo_settings(the_repository);
if (check_references)
OPT_END()
};
- git_config(fsmonitor_config, NULL);
+ repo_config(the_repository, fsmonitor_config, NULL);
argc = parse_options(argc, argv, prefix, options,
builtin_fsmonitor__daemon_usage, 0);
cfg->repack_filter_to = owned;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
enum schedule_priority {
grep_prefix = prefix;
grep_init(&opt, the_repository);
- git_config(grep_cmd_config, &opt);
+ repo_config(the_repository, grep_cmd_config, &opt);
/*
* If there is no -- then the paths must exist in the working
vpath = vpath_free;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (stdin_paths) {
if (hashstdin)
if (!strcmp(format, "web") || !strcmp(format, "html"))
return HELP_FORMAT_WEB;
/*
- * Please update _git_config() in git-completion.bash when you
+ * Please update _repo_config() in git-completion.bash when you
* add new help formats.
*/
die(_("unrecognized help format '%s'"), format);
}
setup_git_directory_gently(&nongit);
- git_config(git_help_config, NULL);
+ repo_config(the_repository, git_help_config, NULL);
if (parsed_help_format != HELP_FORMAT_NONE)
help_format = parsed_help_format;
strvec_push(&opt.args, argv[i]);
/* Need to take into account core.hooksPath */
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
hook_name = argv[0];
if (!ignore_missing)
reset_pack_idx_option(&opts);
opts.flags |= WRITE_REV;
- git_config(git_index_pack_config, &opts);
+ repo_config(the_repository, git_index_pack_config, &opts);
if (prefix && chdir(prefix))
die(_("Cannot come back to cwd"));
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options,
git_interpret_trailers_usage, 0);
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.diff = 1;
rev.simplify_history = 0;
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
memset(&match_all, 0, sizeof(match_all));
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.diff = 1;
rev.always_show_header = 1;
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
init_reflog_walk(&rev.reflog_info);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.verbose_header = 1;
memset(&opt, 0, sizeof(opt));
log_config_init(&cfg);
init_diff_ui_defaults();
- git_config(git_log_config, &cfg);
+ repo_config(the_repository, git_log_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.always_show_header = 1;
memset(&opt, 0, sizeof(opt));
format_config_init(&cfg);
init_diff_ui_defaults();
init_display_notes(&cfg.notes_opt);
- git_config(git_format_config, &cfg);
+ repo_config(the_repository, git_format_config, &cfg);
repo_init_revisions(the_repository, &rev, prefix);
- git_config(grep_config, &rev.grep_filter);
+ repo_config(the_repository, grep_config, &rev.grep_filter);
rev.show_notes = cfg.show_notes;
memcpy(&rev.notes_opt, &cfg.notes_opt, sizeof(cfg.notes_opt));
struct object_context obj_context = {0};
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, ls_tree_options,
ls_tree_usage, 0);
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, merge_base_usage, 0);
if (cmdmode == 'a') {
if (startup_info->have_repository) {
/* Read the configuration file */
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
if (0 <= git_xmerge_style)
xmp.style = git_xmerge_style;
}
if (argc != expected_remaining_argc)
usage_with_options(merge_tree_usage, mt_options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
/* Do the relevant type of merge */
if (o.mode == MODE_REAL)
skip_prefix(branch, "refs/heads/", &branch);
init_diff_ui_defaults();
- git_config(git_merge_config, NULL);
+ repo_config(the_repository, git_merge_config, NULL);
if (!branch || is_null_oid(&head_oid))
head_commit = NULL;
fsck_set_msg_type_from_ids(&fsck_options, FSCK_MSG_EXTRA_HEADER_ENTRY,
FSCK_WARN);
/* config might set fsck.extraHeaderEntry=* again */
- git_config(git_fsck_config, &fsck_options);
+ repo_config(the_repository, git_fsck_config, &fsck_options);
if (fsck_tag_standalone(NULL, buf.buf, buf.len, &fsck_options,
&tagged_oid, &tagged_type))
die(_("tag on stdin did not pass our strict fsck check"));
opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
- git_config(git_multi_pack_index_write_config, NULL);
+ repo_config(the_repository, git_multi_pack_index_write_config, NULL);
options = add_common_options(builtin_multi_pack_index_write_options);
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (the_repository &&
the_repository->objects &&
struct strbuf pathbuf = STRBUF_INIT;
int ret;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_mv_options,
builtin_mv_usage, 0);
mem_pool_init(&string_pool, 0);
init_commit_rev_name(&rev_names);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, opts, name_rev_usage, 0);
#ifndef WITH_BREAKING_CHANGES
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_notes_usage,
PARSE_OPT_SUBCOMMAND_OPTIONAL);
if (!fn) {
reset_pack_idx_option(&pack_idx_opts);
pack_idx_opts.flags |= WRITE_REV;
- git_config(git_pack_config, NULL);
+ repo_config(the_repository, git_pack_config, NULL);
if (git_env_bool(GIT_TEST_NO_WRITE_REV_INDEX, 0))
pack_idx_opts.flags &= ~WRITE_REV;
OPT_END()
};
- git_config(git_patch_id_config, &config);
+ repo_config(the_repository, git_patch_id_config, &config);
/* verbatim implies stable */
if (config.verbatim)
if (!getenv("GIT_REFLOG_ACTION"))
set_reflog_message(argc, argv);
- git_config(git_pull_config, NULL);
+ repo_config(the_repository, git_pull_config, NULL);
if (the_repository->gitdir) {
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
};
packet_trace_identity("push");
- git_config(git_push_config, &flags);
+ repo_config(the_repository, git_push_config, &flags);
argc = parse_options(argc, argv, prefix, options, push_usage, 0);
push_options = (push_options_cmdline.nr
? &push_options_cmdline
struct object_id oid;
const char *three_dots = NULL;
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
repo_diff_setup(the_repository, &diffopt);
opts.src_index = the_repository->index;
opts.dst_index = the_repository->index;
- git_config(git_read_tree_config, NULL);
+ repo_config(the_repository, git_read_tree_config, NULL);
argc = parse_options(argc, argv, cmd_prefix, read_tree_options,
read_tree_usage, 0);
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
- git_config(rebase_config, &options);
+ repo_config(the_repository, rebase_config, &options);
/* options.gpg_sign_opt will be either "-S" or NULL */
gpg_sign = options.gpg_sign_opt ? "" : NULL;
FREE_AND_NULL(options.gpg_sign_opt);
if (!enter_repo(service_dir, 0))
die("'%s' does not appear to be a git repository", service_dir);
- git_config(receive_pack_config, NULL);
+ repo_config(the_repository, receive_pack_config, NULL);
if (cert_nonce_seed)
push_cert_nonce = prepare_push_cert_nonce(service_dir, time(NULL));
OPT_END()
};
- git_config(reflog_expire_config, &opts);
+ repo_config(the_repository, reflog_expire_config, &opts);
save_commit_buffer = 0;
do_all = status = 0;
if (argc)
usage(_("'git refs verify' takes no arguments"));
- git_config(git_fsck_config, &fsck_refs_options);
+ repo_config(the_repository, git_fsck_config, &fsck_refs_options);
prepare_repo_settings(the_repository);
worktrees = get_worktrees_without_reading_head();
{
if (branch_list.nr)
return;
- git_config(config_read_branches, NULL);
+ repo_config(the_repository, config_read_branches, NULL);
}
struct ref_states {
.origin = STRBUF_INIT,
.linenr = -1,
};
- git_config(config_read_push_default, &push_default);
+ repo_config(the_repository, config_read_push_default, &push_default);
if (push_default.scope >= CONFIG_SCOPE_COMMAND)
; /* pass */
else if (push_default.scope >= CONFIG_SCOPE_LOCAL) {
strvec_push(&cmd.args, argv[i]);
if (strcmp(cmd.args.v[cmd.args.nr-1], "default") == 0) {
- git_config(get_remote_default, &default_defined);
+ repo_config(the_repository, get_remote_default, &default_defined);
if (!default_defined) {
strvec_pop(&cmd.args);
strvec_push(&cmd.args, "--all");
list_objects_filter_init(&po_args.filter_options);
- git_config(repack_config, &cruft_po_args);
+ repo_config(the_repository, repack_config, &cruft_po_args);
argc = parse_options(argc, argv, prefix, builtin_repack_options,
git_repack_usage, 0);
};
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);
argc = parse_options(argc, argv, prefix, options, rerere_usage, 0);
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
if (autoupdate == 1)
flags = RERERE_AUTOUPDATE;
OPT_END()
};
- git_config(git_reset_config, NULL);
+ repo_config(the_repository, git_reset_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_reset_usage,
PARSE_OPT_KEEP_DASHDASH);
show_usage_if_asked(argc, argv, rev_list_usage);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
repo_init_revisions(the_repository, &revs, prefix);
revs.abbrev = DEFAULT_ABBREV;
revs.commit_format = CMIT_FMT_UNSPECIFIED;
/* No options; just report on whether we're in a git repo or not. */
if (argc == 1) {
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
return 0;
}
/* The rest of the options require a git repository. */
if (!did_repo_setup) {
prefix = setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
did_repo_setup = 1;
prepare_repo_settings(the_repository);
struct pathspec pathspec;
char *seen;
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, builtin_rm_options,
builtin_rm_usage, 0);
if (nongit && !the_hash_algo)
repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
shortlog_init(&log);
repo_init_revisions(the_repository, &rev, prefix);
parse_options_start(&ctx, argc, argv, prefix, options,
init_commit_name_slab(&name_slab);
- git_config(git_show_branch_config, NULL);
+ repo_config(the_repository, git_show_branch_config, NULL);
/* If nothing is specified, try the default first */
if (ac == 1 && default_args.nr) {
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, show_ref_options,
show_ref_usage, 0);
builtin_sparse_checkout_options,
builtin_sparse_checkout_usage, 0);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
prepare_repo_settings(the_repository);
the_repository->settings.command_requires_full_index = 0;
int do_usage = 0;
init_diff_ui_defaults();
- git_config(git_diff_ui_config, NULL);
+ repo_config(the_repository, git_diff_ui_config, NULL);
repo_init_revisions(the_repository, &rev, prefix);
argc = parse_options(argc, argv, prefix, options, git_stash_show_usage,
const char **args_copy;
int ret;
- git_config(git_stash_config, NULL);
+ repo_config(the_repository, git_stash_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_stash_usage,
PARSE_OPT_SUBCOMMAND_OPTIONAL |
if (mode == STRIP_COMMENTS || mode == COMMENT_LINES) {
setup_git_directory_gently(&nongit);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
if (strbuf_read(&buf, 0, 1024) < 0)
"--ignore-submodules=dirty", "--quiet", "--",
path, NULL);
- git_config(git_diff_basic_config, NULL);
+ repo_config(the_repository, git_diff_basic_config, NULL);
repo_init_revisions(the_repository, &rev, NULL);
rev.abbrev = 0;
if (info->argc)
strvec_pushv(&diff_args, info->argv);
- git_config(git_diff_basic_config, NULL);
+ repo_config(the_repository, git_diff_basic_config, NULL);
repo_init_revisions(the_repository, &rev, info->prefix);
rev.abbrev = 0;
precompose_argv_prefix(diff_args.nr, diff_args.v, NULL);
};
update_clone_config_from_gitmodules(&opt.max_jobs);
- git_config(git_update_clone_config, &opt.max_jobs);
+ repo_config(the_repository, git_update_clone_config, &opt.max_jobs);
argc = parse_options(argc, argv, prefix, module_update_options,
git_submodule_helper_usage, 0);
NULL
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
track = git_branch_track;
argc = parse_options(argc, argv, prefix, options, usage, 0);
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options,
git_symbolic_ref_usage, 0);
if (msg && !*msg)
* Try to set sort keys from config. If config does not set any,
* fall back on default (refname) sorting.
*/
- git_config(git_tag_config, &sorting_options);
+ repo_config(the_repository, git_tag_config, &sorting_options);
if (!sorting_options.nr)
string_list_append(&sorting_options, "refname");
if (repo_get_oid(the_repository, argv[1], &oid))
die("Not a valid object name %s", argv[1]);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
puts(create_temp_file(&oid));
return 0;
disable_replace_refs();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
quiet = !isatty(2);
show_usage_with_options_if_asked(argc, argv,
update_index_usage, options);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
prepare_repo_settings(r);
the_repository->settings.command_requires_full_index = 0;
OPT_END(),
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, options, git_update_ref_usage,
0);
if (msg && !*msg)
usage(var_usage);
if (strcmp(argv[1], "-l") == 0) {
- git_config(show_config, NULL);
+ repo_config(the_repository, show_config, NULL);
list_vars();
return 0;
}
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
git_var = get_git_var(argv[1]);
if (!git_var)
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, prefix, verify_pack_options,
verify_pack_usage, 0);
if (argc < 1)
OPT_END()
};
- git_config(git_worktree_config, NULL);
+ repo_config(the_repository, git_worktree_config, NULL);
if (!prefix)
prefix = "";
OPT_END()
};
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
argc = parse_options(argc, argv, cmd_prefix, write_tree_options,
write_tree_usage, 0);
int lookup_config(const char **mapping, int nr_mapping, const char *var);
# ifdef USE_THE_REPOSITORY_VARIABLE
-static inline void git_config(config_fn_t fn, void *data)
-{
- repo_config(the_repository, fn, data);
-}
-
static inline void git_config_clear(void)
{
repo_config_clear(the_repository);
static int git_use_proxy(const char *host)
{
git_proxy_command = getenv("GIT_PROXY_COMMAND");
- git_config(git_proxy_command_options, (void*)host);
+ repo_config(the_repository, git_proxy_command_options, (void*)host);
return (git_proxy_command && *git_proxy_command);
}
// The previous rules don't catch all callbacks, especially if they're defined
-// in a separate file from the git_config() call. Fix these manually.
+// in a separate file from the repo_config() call. Fix these manually.
@@
identifier C1, C2, D;
attribute name UNUSED;
"eol", "text", "working-tree-encoding",
NULL);
user_convert_tail = &user_convert;
- git_config(read_convert_config, NULL);
+ repo_config(the_repository, read_convert_config, NULL);
}
git_check_attr(istate, path, check);
}
}
- git_config(fetch_pack_config_cb, NULL);
+ repo_config(the_repository, fetch_pack_config_cb, NULL);
}
static void fetch_pack_setup(void)
struct key_value_info;
/*
- * git_config() callback for use by fsck-y tools that want to support
+ * repo_config() callback for use by fsck-y tools that want to support
* fsck.<msg> fsck.skipList etc.
*/
int git_fsck_config(const char *var, const char *value,
if (done)
return;
done = 1;
- git_config(git_gpg_config, NULL);
+ repo_config(the_repository, git_gpg_config, NULL);
}
static char *configured_signing_key;
void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
{
unsigned int colopts = 0;
- git_config(get_colopts, &colopts);
+ repo_config(the_repository, get_colopts, &colopts);
if (main_cmds->cnt) {
const char *exec_path = git_exec_path();
struct cmdname_help *aliases;
int i;
- git_config(get_alias, &alias_list);
+ repo_config(the_repository, get_alias, &alias_list);
string_list_sort(&alias_list);
for (i = 0; i < alias_list.nr; i++) {
trace2_cmd_name("http-fetch");
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
if (packfile) {
if (!index_pack_args.nr)
http_is_verbose = 0;
normalized_url = url_normalize(url, &config.url);
- git_config(urlmatch_config_entry, &config);
+ repo_config(the_repository, urlmatch_config_entry, &config);
free(normalized_url);
string_list_clear(&config.vars, 1);
int ret;
setup_git_directory_gently(&nongit_ok);
- git_config(git_imap_config, &server);
+ repo_config(the_repository, git_imap_config, &server);
argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0);
strbuf_init(&data.buf, 0);
strvec_init(&data.hidden_refs);
- git_config(ls_refs_config, &data);
+ repo_config(the_repository, ls_refs_config, &data);
while (packet_reader_read(request) == PACKET_READ_NORMAL) {
const char *arg = request->line;
if (ll_user_merge_tail)
return;
ll_user_merge_tail = &ll_user_merge;
- git_config(read_merge_config, NULL);
+ repo_config(the_repository, read_merge_config, NULL);
}
static const struct ll_merge_driver *find_ll_merge_driver(const char *merge_attr)
free(value);
}
}
- git_config(git_xmerge_config, NULL);
+ repo_config(the_repository, git_xmerge_config, NULL);
}
static void init_merge_options(struct merge_options *opt,
c->refs_from_env = 1;
string_list_add_refs_from_colon_sep(c->refs, rewrite_refs_env);
}
- git_config(notes_rewrite_config, c);
+ repo_config(the_repository, notes_rewrite_config, c);
if (!c->enabled || !c->refs->nr) {
string_list_clear(c->refs, 0);
free(c->refs);
load_config_refs = 1;
}
- git_config(notes_display_config, &load_config_refs);
+ repo_config(the_repository, notes_display_config, &load_config_refs);
if (opt) {
struct string_list_item *item;
COPY_ARRAY(commit_formats, builtin_formats,
ARRAY_SIZE(builtin_formats));
- git_config(git_pretty_formats_config, NULL);
+ repo_config(the_repository, git_pretty_formats_config, NULL);
}
static struct cmt_fmt_map *find_commit_format_recursive(const char *sought,
refs->write_options.lock_timeout_ms = 100;
refs->write_options.fsync = reftable_be_fsync;
- git_config(reftable_be_config, &refs->write_options);
+ repo_config(the_repository, reftable_be_config, &refs->write_options);
/*
* It is somewhat unfortunate that we have to mirror the default block
{
git_config_get_bool("rerere.enabled", &rerere_enabled);
git_config_get_bool("rerere.autoupdate", &rerere_autoupdate);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
}
static GIT_PATH_FUNC(git_path_rr_cache, "rr-cache")
&cutoff_resolve, now);
repo_config_get_expiry_in_days(the_repository, "gc.rerereunresolved",
&cutoff_noresolve, now);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
dir = opendir(repo_git_path_replace(the_repository, &buf, "rr-cache"));
if (!dir)
die_errno(_("unable to open rr-cache directory"));
cb.exclusions = exclusions;
cb.section = section;
- git_config(hide_refs_config, &cb);
+ repo_config(the_repository, hide_refs_config, &cb);
}
struct all_refs_cb {
maintenance_str);
}
- git_config(get_scalar_repos, &scalar_repos);
+ repo_config(the_repository, get_scalar_repos, &scalar_repos);
for (size_t i = 0; i < scalar_repos.nr; i++) {
int succeeded = 0;
void sequencer_init_config(struct replay_opts *opts)
{
opts->default_msg_cleanup = COMMIT_MSG_CLEANUP_NONE;
- git_config(git_sequencer_config, opts);
+ repo_config(the_repository, git_sequencer_config, opts);
}
static inline int is_rebase_i(const struct replay_opts *opts)
copy_templates(template_path);
git_config_clear();
repo_settings_reset_shared_repository(the_repository);
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
reinit = is_reinit();
* have set up the repository format such that we can evaluate
* includeIf conditions correctly in the case of re-initialization.
*/
- git_config(platform_core_config, NULL);
+ repo_config(the_repository, platform_core_config, NULL);
safe_create_dir(the_repository, git_dir, 0);
die("usage: %s <advice>", argv[0]);
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
/*
* Any advice type can be used for testing, but NESTED_TAG was
* ascending order of priority from a config_set
* constructed from files entered as arguments.
*
- * iterate -> iterate over all values using git_config(), and print some
+ * iterate -> iterate over all values using repo_config(), and print some
* data for each
*
- * git_config_int -> iterate over all values using git_config() and print the
+ * git_config_int -> iterate over all values using repo_config() and print the
* integer value for the entered key or die
*
* Examples:
goto exit1;
}
} else if (!strcmp(argv[1], "iterate")) {
- git_config(iterate_cb, NULL);
+ repo_config(the_repository, iterate_cb, NULL);
goto exit0;
} else if (argc == 3 && !strcmp(argv[1], "git_config_int")) {
- git_config(parse_int_cb, (void *) argv[2]);
+ repo_config(the_repository, parse_int_cb, (void *) argv[2]);
goto exit0;
}
if (argc == 2)
cnt = strtol(argv[1], NULL, 0);
setup_git_directory();
- git_config(git_default_config, NULL);
+ repo_config(the_repository, git_default_config, NULL);
for (i = 0; i < cnt; i++) {
repo_read_index(the_repository);
if (want & USERDIFF_DRIVER_TYPE_CUSTOM) {
setup_git_directory();
- git_config(cmd__userdiff_config, NULL);
+ repo_config(the_repository, cmd__userdiff_config, NULL);
}
for_each_userdiff_driver(driver_cb, &want);
mi->header_stage = 1;
mi->use_inbody_headers = 1;
mi->content_top = mi->content;
- git_config(git_mailinfo_config, mi);
+ repo_config(the_repository, git_mailinfo_config, mi);
}
void clear_mailinfo(struct mailinfo *mi)
mi->header_stage = 1;
mi->use_inbody_headers = 1;
mi->content_top = mi->content;
- git_config(git_mailinfo_config, mi);
+ repo_config(the_repository, git_mailinfo_config, mi);
}
void clear_mailinfo(struct mailinfo *mi)
default_conf_info.where = WHERE_END;
default_conf_info.if_exists = EXISTS_ADD_IF_DIFFERENT_NEIGHBOR;
default_conf_info.if_missing = MISSING_ADD;
- git_config(git_trailer_default_config, NULL);
- git_config(git_trailer_config, NULL);
+ repo_config(the_repository, git_trailer_default_config, NULL);
+ repo_config(the_repository, git_trailer_config, NULL);
configured = 1;
}
if (!data->get_refs_from_bundle_called)
get_refs_from_bundle_inner(transport);
- git_config(fetch_fsck_config_cb, &msg_types);
+ repo_config(the_repository, fetch_fsck_config_cb, &msg_types);
opts.fsck_msg_types = msg_types.buf;
ret = unbundle(the_repository, &data->header, data->fd,