git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Improve documentation concerning the status.submodulesummary setting

From
Jens Lehmann <jens.lehmann@web.de>
Date
Sep 11, 2013, 19:07 UTC
Message-ID
<5230BF63.30006@web.de>
In-Reply-To
<522F486A.1000705@web.de>

'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>
---
Am 10.09.2013 18:27, schrieb Jens Lehmann:
Show 14 quoted lines
> Am 10.09.2013 00:53, schrieb Junio C Hamano:
>> * bc/submodule-status-ignored (2013-09-04) 2 commits
>>  - submodule: don't print status output with ignore=all
>>  - submodule: fix confusing variable name
>>
>>  Originally merged to 'next' on 2013-08-22
>>
>>  Will merge to 'next'.
> 
> I propose to cook this some time in next to give submodule
> users who have configured ignore=all the opportunity to test
> and comment on that. And as Matthieu noticed the documentation
> is not terribly clear here, I'll prepare one or two patches to
> fix that which should go in together with these changes.
And here we go. Matthieu, does that make it more obvious?
 Documentation/config.txt      | 12 ++++++++++--
 Documentation/diff-config.txt |  6 +++++-
 Documentation/git-status.txt  |  8 +++++++-
 Documentation/gitmodules.txt  |  3 ++-
 4 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 44e7873..52f20ab 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2207,7 +2207,14 @@ status.submodulesummary::
 	If this is set to a non zero number or true (identical to -1 or an
 	unlimited number), the submodule summary will be enabled and a
 	summary of commits for modified submodules will be shown (see
-	--summary-limit option of linkgit:git-submodule[1]).
+	--summary-limit option of linkgit:git-submodule[1]). Please note
+	that the summary output command will be suppressed for all
+	submodules when `diff.ignoreSubmodules` is set to 'all' or only
+	for those submodules where `submodule.<name>.ignore=all`. To
+	also view the summary for ignored submodules you can either use
+	the --ignore-submodules=dirty command line option or the 'git
+	submodule summary' command, which shows a similar output but does
+	not honor these settings.

 submodule.<name>.path::
 submodule.<name>.url::
@@ -2242,7 +2249,8 @@ submodule.<name>.ignore::
 	submodules that have untracked files in their work tree as changed.
 	This setting overrides any setting made in .gitmodules for this submodule,
 	both settings can be overridden on the command line by using the
-	"--ignore-submodules" option.
+	"--ignore-submodules" option. The 'git submodule' commands are not
+	affected by this setting.

 tar.umask::
 	This variable can be used to restrict the permission bits of
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index ac77050..223b931 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -73,7 +73,11 @@ diff.ignoreSubmodules::
 	Sets the default value of --ignore-submodules. Note that this
 	affects only 'git diff' Porcelain, and not lower level 'diff'
 	commands such as 'git diff-files'. 'git checkout' also honors
-	this setting when reporting uncommitted changes.
+	this setting when reporting uncommitted changes. Setting it to
+	'all' disables the submodule summary normally shown by 'git commit'
+	and 'git status' when 'status.submodulesummary' is set unless it is
+	overridden by using the --ignore-submodules command line option.
+	The 'git submodule' commands are not affected by this setting.

 diff.mnemonicprefix::
 	If set, 'git diff' uses a prefix pair that is different from the
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 9046df9..a4acaa0 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -210,7 +210,13 @@ directory.
 If `status.submodulesummary` is set to a non zero number or true (identical
 to -1 or an unlimited number), the submodule summary will be enabled for
 the long format and a summary of commits for modified submodules will be
-shown (see --summary-limit option of linkgit:git-submodule[1]).
+shown (see --summary-limit option of linkgit:git-submodule[1]). Please note
+that the summary output from the status command will be suppressed for all
+submodules when `diff.ignoreSubmodules` is set to 'all' or only for those
+submodules where `submodule.<name>.ignore=all`. To also view the summary for
+ignored submodules you can either use the --ignore-submodules=dirty command
+line option or the 'git submodule summary' command, which shows a similar
+output but does not honor these settings.

 SEE ALSO
 --------
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
index 6a1ca4a..f7be93f 100644
--- a/Documentation/gitmodules.txt
+++ b/Documentation/gitmodules.txt
@@ -75,7 +75,8 @@ submodule.<name>.ignore::
 	the superproject, the setting there will override the one found in
 	.gitmodules.
 	Both settings can be overridden on the command line by using the
-	"--ignore-submodule" option.
+	"--ignore-submodule" option. The 'git submodule' commands are not
+	affected by this setting.


 EXAMPLES
-- 
1.8.4.444.gf9f2042
Previous: Junio C HamanoNext: Matthieu Moy
Message 6 of 11 in “What's cooking in git.git (Sep 2013, #02; Mon, 9)”
  1. Junio C HamanoSep 9, 2013
  2. Matthieu MoySep 10, 2013
  3. Junio C HamanoSep 10, 2013
  4. Jens LehmannSep 10, 2013
  5. Junio C HamanoSep 10, 2013
  6. Improve documentation concerning the status.submodulesummary settingJens Lehmann, Sep 11, 2013
  7. Matthieu MoySep 11, 2013
  8. Junio C HamanoSep 20, 2013
  9. Jens LehmannSep 22, 2013
  10. Matthieu MoySep 22, 2013
  11. Stefan BellerSep 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.