Add the 'diff.ignoreSubmodules' config setting
commit37aea371f720c41830e1a2dcee3a7a23525a389a
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 5 Aug 2010 08:49:55 +0000 (5 10:49 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 11 Aug 2010 14:20:11 +0000 (11 16:20 +0200)
tree246d0a3b32ce644196e28677a00a6375b11f19e0
parentce6e6a94349ea9275a70e6a30f701990e71afbb2
Add the 'diff.ignoreSubmodules' config setting

When you have a lot of submodules checked out, the time penalty to check
for dirty submodules can easily imply a multiplication of the total time
by the factor 20. This makes the difference between almost instantaneous
(< 2 seconds) and unbearably slow (> 50 seconds) here, since the disk
caches are constantly overloaded.

To this end, the submodule.*.ignore config option was introduced, but it
is per-submodule.

This commit introduces a global config setting to set a default
(porcelain) value for the --ignore-submodules option, keeping the
default at 'none'. It can be overridden by the submodule.*.ignore
setting and by the --ignore-submodules option.

Incidentally, this commit fixes an issue with the overriding logic:
multiple --ignore-submodules options would not clear the previously
set flags.

While at it, fix a typo in the documentation for submodule.*.ignore.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Documentation/config.txt
diff.c
submodule.c