MCPcopy Index your code
hub / github.com/git/git / set_diffopt_flags_from_submodule_config

Function set_diffopt_flags_from_submodule_config

submodule.c:180–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void 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 */
203int git_default_submodule_config(const char *var, const char *value,

Callers 2

is_submodule_ignoredFunction · 0.85

Calls 6

submodule_from_pathFunction · 0.85
null_oidFunction · 0.85
xstrfmtFunction · 0.85
is_gitmodules_unmergedFunction · 0.85

Tested by

no test coverage detected