| 291 | } |
| 292 | |
| 293 | int git_default_core_config(const char *var, const char *value, |
| 294 | const struct config_context *ctx, void *cb) |
| 295 | { |
| 296 | struct repo_config_values *cfg = repo_config_values(the_repository); |
| 297 | |
| 298 | /* This needs a better name */ |
| 299 | if (!strcmp(var, "core.filemode")) { |
| 300 | trust_executable_bit = git_config_bool(var, value); |
| 301 | return 0; |
| 302 | } |
| 303 | if (!strcmp(var, "core.trustctime")) { |
| 304 | cfg->trust_ctime = git_config_bool(var, value); |
| 305 | return 0; |
| 306 | } |
| 307 | if (!strcmp(var, "core.checkstat")) { |
| 308 | if (!value) |
| 309 | return config_error_nonbool(var); |
| 310 | if (!strcasecmp(value, "default")) |
| 311 | cfg->check_stat = 1; |
| 312 | else if (!strcasecmp(value, "minimal")) |
| 313 | cfg->check_stat = 0; |
| 314 | else |
| 315 | return error(_("invalid value for '%s': '%s'"), |
| 316 | var, value); |
| 317 | } |
| 318 | |
| 319 | if (!strcmp(var, "core.quotepath")) { |
| 320 | quote_path_fully = git_config_bool(var, value); |
| 321 | return 0; |
| 322 | } |
| 323 | |
| 324 | if (!strcmp(var, "core.symlinks")) { |
| 325 | has_symlinks = git_config_bool(var, value); |
| 326 | return 0; |
| 327 | } |
| 328 | |
| 329 | if (!strcmp(var, "core.ignorecase")) { |
| 330 | ignore_case = git_config_bool(var, value); |
| 331 | return 0; |
| 332 | } |
| 333 | |
| 334 | if (!strcmp(var, "core.attributesfile")) { |
| 335 | FREE_AND_NULL(cfg->attributes_file); |
| 336 | return git_config_pathname(&cfg->attributes_file, var, value); |
| 337 | } |
| 338 | |
| 339 | if (!strcmp(var, "core.bare")) { |
| 340 | is_bare_repository_cfg = git_config_bool(var, value); |
| 341 | return 0; |
| 342 | } |
| 343 | |
| 344 | if (!strcmp(var, "core.ignorestat")) { |
| 345 | assume_unchanged = git_config_bool(var, value); |
| 346 | return 0; |
| 347 | } |
| 348 | |
| 349 | if (!strcmp(var, "core.abbrev")) { |
| 350 | if (!value) |
no test coverage detected