Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
submodule: don't rely on overlayed config when setting diffopts
author
Brandon Williams
<bmwill@google.com>
Thu, 3 Aug 2017 18:19:52 +0000
(11:19 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 3 Aug 2017 20:11:01 +0000
(13:11 -0700)
Don't rely on overlaying the repository's config on top of the
submodule-config, instead query the repository's config directory for
the ignore field.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
492c6c4
)
diff --git
a/submodule.c
b/submodule.c
index 59e3d0828fcfa957bdf5a50c782e50c783f6e47b..a32043893bd294f8ecd02c58d0ac6dfbfb356273 100644
(file)
--- a/
submodule.c
+++ b/
submodule.c
@@
-165,8
+165,16
@@
void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
{
const struct submodule *submodule = submodule_from_path(&null_oid, path);
if (submodule) {
{
const struct submodule *submodule = submodule_from_path(&null_oid, path);
if (submodule) {
- if (submodule->ignore)
- handle_ignore_submodules_arg(diffopt, submodule->ignore);
+ const char *ignore;
+ char *key;
+
+ key = xstrfmt("submodule.%s.ignore", submodule->name);
+ if (repo_config_get_string_const(the_repository, key, &ignore))
+ ignore = submodule->ignore;
+ free(key);
+
+ if (ignore)
+ handle_ignore_submodules_arg(diffopt, ignore);
else if (is_gitmodules_unmerged(&the_index))
DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES);
}
else if (is_gitmodules_unmerged(&the_index))
DIFF_OPT_SET(diffopt, IGNORE_SUBMODULES);
}