return is_bare_repository_cfg && !repo_get_work_tree(the_repository);
}
+int repo_ignore_case(struct repository *repo)
+{
+ return (repo && repo->initialized) ?
+ repo_config_values(repo)->ignore_case :
+ 0;
+}
+
int have_git_dir(void)
{
return startup_info->have_repository
{
cfg->attributes_file = NULL;
cfg->apply_sparse_checkout = 0;
+ cfg->ignore_case = 0;
cfg->branch_track = BRANCH_TRACK_REMOTE;
}
/* section "core" config values */
char *attributes_file;
int apply_sparse_checkout;
+ int ignore_case;
/* section "branch" config values */
enum branch_track branch_track;
int git_default_core_config(const char *var, const char *value,
const struct config_context *ctx, void *cb);
+/*
+ * Getter for the `ignore_case` field of `struct repo_config_values`.
+ * It checks `repo->initialized` to prevent calling repo_config_values()`
+ * before the repository setup is fully complete or in non-git environments.
+ */
+int repo_ignore_case(struct repository *repo);
+
void repo_config_values_init(struct repo_config_values *cfg);
/*