Skip to content

Commit 867ad4d

Browse files
committed
Documentation: add --include_ignored_submodules + ignore=all config
- git-add.adoc: Add new documentation for --include_ignored_submodules option to supress ignore=all and new submodule functionality of not adding a ignore=all submodule by default. - gitmodules.adoc and config/submodule.adoc: The submodule config ignore=all now need --include_ignored_submodules in order to update the index. Signed-off-by: Claus Schneider(Eficode) <claus.schneider@eficode.com>
1 parent 93c9595 commit 867ad4d

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Documentation/config/submodule.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ submodule.<name>.fetchRecurseSubmodules::
3232

3333
submodule.<name>.ignore::
3434
Defines under what circumstances "git status" and the diff family show
35-
a submodule as modified. When set to "all", it will never be considered
36-
modified (but it will nonetheless show up in the output of status and
37-
commit when it has been staged), "dirty" will ignore all changes
38-
to the submodule's work tree and
39-
takes only differences between the HEAD of the submodule and the commit
40-
recorded in the superproject into account. "untracked" will additionally
35+
a submodule as modified.
36+
Set to "all" will never considered the submodule modified. It can
37+
nevertheless be staged using the option --include_ignored_submodules and
38+
it will then show up in the output of status.
39+
Set to "dirty" will ignore all changes to the submodule's work tree and
40+
takes only differences between the HEAD of the submodule and the commit
41+
recorded in the superproject into account. "untracked" will additionally
4142
let submodules with modified tracked files in their work tree show up.
42-
Using "none" (the default when this option is not set) also shows
43-
submodules that have untracked files in their work tree as changed.
43+
Set to "none"(default) It is also shows submodules that have untracked
44+
files in their work tree as changed.
4445
This setting overrides any setting made in .gitmodules for this submodule,
4546
both settings can be overridden on the command line by using the
4647
"--ignore-submodules" option. The 'git submodule' commands are not

Documentation/git-add.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ in linkgit:gitglossary[7].
7979
`--force`::
8080
Allow adding otherwise ignored files.
8181

82+
`--include_ignored_submodules`::
83+
The option is also used when `submodule.<name>.ignore=all`
84+
is set, but you want to stage an update of the submodule. The
85+
`path` to the submodule must be explicitly specified.
86+
8287
`--sparse`::
8388
Allow updating index entries outside of the sparse-checkout cone.
8489
Normally, `git add` refuses to update index entries whose paths do

Documentation/gitmodules.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ submodule.<name>.ignore::
7070
--
7171
all;; The submodule will never be considered modified (but will
7272
nonetheless show up in the output of status and commit when it has
73-
been staged).
73+
been staged). Add `(new commits)` can be overruled using the
74+
`git add --include_ignored_submodules <submodule.path>`
75+
The setting affects `status`, `update-index`, `diff` and `log`(due
76+
to underlaying `diff`).
7477

7578
dirty;; All changes to the submodule's work tree will be ignored, only
7679
committed differences between the `HEAD` of the submodule and its

0 commit comments

Comments
 (0)