Improve documentation concerning the status.submodulesummary setting

'git status' and 'git commit' can be told to also show the output of "git submodule summary" by setting the "status.submodulesummary" config option. But status and commit also honor the "diff.ignoreSubmodules" and the "submodule.<name>.ignore" settings, which then disable the summary partly or completely. This - and the fact that the last two settings do not affect the "git submodule" commands at all - is not well documented. Extend the documentation in those places where "status.submodulesummary", "diff.ignoreSubmodules" and "submodule.<name>.ignore" are described to better explain these dependencies. Thanks-to: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jens Lehmann committed Sep 11, 2013 at 21:07 UTC bb58b696c6ad810560d361b640580715a90382cb
4 files changed +24 -5
Documentation/config.txt
+10 -2
@@ -2142,7 +2142,14 @@ status.submodulesummary::
2142 If this is set to a non zero number or true (identical to -1 or an
2143 unlimited number), the submodule summary will be enabled and a
2144 summary of commits for modified submodules will be shown (see
2145 - --summary-limit option of linkgit:git-submodule[1]).
2145 + --summary-limit option of linkgit:git-submodule[1]). Please note
2146 + that the summary output command will be suppressed for all
2147 + submodules when `diff.ignoreSubmodules` is set to 'all' or only
2148 + for those submodules where `submodule.<name>.ignore=all`. To
2149 + also view the summary for ignored submodules you can either use
2150 + the --ignore-submodules=dirty command line option or the 'git
2151 + submodule summary' command, which shows a similar output but does
2152 + not honor these settings.
2153
2154 submodule.<name>.path::
2155 submodule.<name>.url::
@@ -2177,7 +2184,8 @@ submodule.<name>.ignore::
2184 submodules that have untracked files in their work tree as changed.
2185 This setting overrides any setting made in .gitmodules for this submodule,
2186 both settings can be overridden on the command line by using the
2180 - "--ignore-submodules" option.
2187 + "--ignore-submodules" option. The 'git submodule' commands are not
2188 + affected by this setting.
2189
2190 tar.umask::
2191 This variable can be used to restrict the permission bits of
Documentation/diff-config.txt
+5 -1
@@ -73,7 +73,11 @@ diff.ignoreSubmodules::
73 Sets the default value of --ignore-submodules. Note that this
74 affects only 'git diff' Porcelain, and not lower level 'diff'
75 commands such as 'git diff-files'. 'git checkout' also honors
76 - this setting when reporting uncommitted changes.
76 + this setting when reporting uncommitted changes. Setting it to
77 + 'all' disables the submodule summary normally shown by 'git commit'
78 + and 'git status' when 'status.submodulesummary' is set unless it is
79 + overridden by using the --ignore-submodules command line option.
80 + The 'git submodule' commands are not affected by this setting.
81
82 diff.mnemonicprefix::
83 If set, 'git diff' uses a prefix pair that is different from the
Documentation/git-status.txt
+7 -1
@@ -210,7 +210,13 @@ directory.
210 If `status.submodulesummary` is set to a non zero number or true (identical
211 to -1 or an unlimited number), the submodule summary will be enabled for
212 the long format and a summary of commits for modified submodules will be
213 -shown (see --summary-limit option of linkgit:git-submodule[1]).
213 +shown (see --summary-limit option of linkgit:git-submodule[1]). Please note
214 +that the summary output from the status command will be suppressed for all
215 +submodules when `diff.ignoreSubmodules` is set to 'all' or only for those
216 +submodules where `submodule.<name>.ignore=all`. To also view the summary for
217 +ignored submodules you can either use the --ignore-submodules=dirty command
218 +line option or the 'git submodule summary' command, which shows a similar
219 +output but does not honor these settings.
220
221 SEE ALSO
222 --------
Documentation/gitmodules.txt
+2 -1
@@ -75,7 +75,8 @@ submodule.<name>.ignore::
75 the superproject, the setting there will override the one found in
76 .gitmodules.
77 Both settings can be overridden on the command line by using the
78 - "--ignore-submodule" option.
78 + "--ignore-submodule" option. The 'git submodule' commands are not
79 + affected by this setting.
80
81
82 EXAMPLES