summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorHeiko Voigt <hvoigt@hvoigt.net>2013-12-04 23:19:59 +0100
committerJunio C Hamano <gitster@pobox.com>2013-12-06 12:56:12 -0800
commit5f3eb7674082a52dea6c6252752509b05a3bfe0a (patch)
treeec0f2b95958699a94a2375f8c9c5493ea6d09260 /diff-lib.c
parent8ea31d279681533c0b4c8eb1d61b18e95da55df0 (diff)
downloadgit-hv/submodule-ignore-fix.tar.gz
disable complete ignorance of submodules for index <-> HEAD diffhv/submodule-ignore-fix
If the value of ignore for submodules is set to "all" we would not show whats actually committed during status or diff. This can result in the user committing unexpected submodule references. Lets be nicer and always show whats in the index. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 346cac651d..c5219cb046 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -483,6 +483,9 @@ int run_diff_index(struct rev_info *revs, int cached)
{
struct object_array_entry *ent;
+ if (cached)
+ enforce_no_complete_ignore_submodule(&revs->diffopt);
+
ent = revs->pending.objects;
if (diff_cache(revs, ent->item->sha1, ent->name, cached))
exit(128);