| 585 | } |
| 586 | |
| 587 | static int read_worktree_config(const char *var, const char *value, |
| 588 | const struct config_context *ctx UNUSED, |
| 589 | void *vdata) |
| 590 | { |
| 591 | struct repository_format *data = vdata; |
| 592 | |
| 593 | if (strcmp(var, "core.bare") == 0) { |
| 594 | data->is_bare = git_config_bool(var, value); |
| 595 | } else if (strcmp(var, "core.worktree") == 0) { |
| 596 | if (!value) |
| 597 | return config_error_nonbool(var); |
| 598 | free(data->work_tree); |
| 599 | data->work_tree = xstrdup(value); |
| 600 | } |
| 601 | return 0; |
| 602 | } |
| 603 | |
| 604 | enum extension_result { |
| 605 | EXTENSION_ERROR = -1, /* compatible with error(), etc */ |
no test coverage detected