| 178 | } |
| 179 | |
| 180 | void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, |
| 181 | const char *path) |
| 182 | { |
| 183 | const struct submodule *submodule = submodule_from_path(the_repository, |
| 184 | null_oid(the_hash_algo), |
| 185 | path); |
| 186 | if (submodule) { |
| 187 | const char *ignore; |
| 188 | char *key; |
| 189 | |
| 190 | key = xstrfmt("submodule.%s.ignore", submodule->name); |
| 191 | if (repo_config_get_string_tmp(the_repository, key, &ignore)) |
| 192 | ignore = submodule->ignore; |
| 193 | free(key); |
| 194 | |
| 195 | if (ignore) |
| 196 | handle_ignore_submodules_arg(diffopt, ignore); |
| 197 | else if (is_gitmodules_unmerged(the_repository->index)) |
| 198 | diffopt->flags.ignore_submodules = 1; |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /* Cheap function that only determines if we're interested in submodules at all */ |
| 203 | int git_default_submodule_config(const char *var, const char *value, |
no test coverage detected