summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2010-08-05 22:39:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-09 16:01:52 (GMT)
commitaee9c7d6540fe6f66fbbe7be420caa26ae0fa2d9 (patch)
tree848391891b4866c4c34f521658b66487a9768f9a /Documentation
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-aee9c7d6540fe6f66fbbe7be420caa26ae0fa2d9.zip
git-aee9c7d6540fe6f66fbbe7be420caa26ae0fa2d9.tar.gz
git-aee9c7d6540fe6f66fbbe7be420caa26ae0fa2d9.tar.bz2
Submodules: Add the new "ignore" config option for diff and status
The new "ignore" config option controls the default behavior for "git status" and the diff family. It specifies under what circumstances they consider submodules as modified and can be set separately for each submodule. The command line option "--ignore-submodules=" has been extended to accept the new parameter "none" for both status and diff. Users that chose submodules to get rid of long work tree scanning times might want to set the "dirty" option for those submodules. This brings back the pre 1.7.0 behavior, where submodule work trees were never scanned for modifications. By using "--ignore-submodules=none" on the command line the status and diff commands can be told to do a full scan. This option can be set to the following values (which have the same name and meaning as for the "--ignore-submodules" option of status and diff): "all": All changes to the submodule will be ignored. "dirty": Only differences of the commit recorded in the superproject and the submodules HEAD will be considered modifications, all changes to the work tree of the submodule will be ignored. When using this value, the submodule will not be scanned for work tree changes at all, leading to a performance benefit on large submodules. "untracked": Only untracked files in the submodules work tree are ignored, a changed HEAD and/or modified files in the submodule will mark it as modified. "none" (which is the default): Either untracked or modified files in a submodules work tree or a difference between the subdmodules HEAD and the commit recorded in the superproject will make it show up as changed. This value is added as a new parameter for the "--ignore-submodules" option of the diff family and "git status" so the user can override the settings in the configuration. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt10
-rw-r--r--Documentation/diff-options.txt6
-rw-r--r--Documentation/git-status.txt6
3 files changed, 20 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index e75434b..5ca09ae 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1743,6 +1743,16 @@ submodule.<name>.update::
URL and other values found in the `.gitmodules` file. See
linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
+submodule.<name>.ignore::
+ Defines under what circumstances "git status" and the diff family show
+ a submodule as modified. When set to "all", it will never be considered
+ modified, "dirty" will ignore all changes to the submodules work tree and
+ takes only differences between the HEAD of the submodule and the commit
+ recorded in the superproject into account. "untracked" will additionally
+ let submodules with modified tracked files in their work tree show up.
+ Using "none" (the default when this option is not set) also shows
+ submodules that have untracked files in their work tree as changed.
+
tar.umask::
This variable can be used to restrict the permission bits of
tar archive entries. The default is 0002, which turns off the
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 2371262..9cf7506 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -330,7 +330,11 @@ endif::git-format-patch[]
--ignore-submodules[=<when>]::
Ignore changes to submodules in the diff generation. <when> can be
- either "untracked", "dirty" or "all", which is the default. When
+ either "none", "untracked", "dirty" or "all", which is the default
+ Using "none" will consider the submodule modified when it either contains
+ untracked or modified files or its HEAD differs from the commit recorded
+ in the superproject and can be used to override any settings of the
+ 'ignore' option in linkgit:git-config[1]. When
"untracked" is used submodules are not considered dirty when they only
contain untracked content (but they are still scanned for modified
content). Using "dirty" ignores all changes to the work tree of submodules,
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 2fd054c..a7a5d79 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -55,7 +55,11 @@ specified.
--ignore-submodules[=<when>]::
Ignore changes to submodules when looking for changes. <when> can be
- either "untracked", "dirty" or "all", which is the default. When
+ either "none", "untracked", "dirty" or "all", which is the default.
+ Using "none" will consider the submodule modified when it either contains
+ untracked or modified files or its HEAD differs from the commit recorded
+ in the superproject and can be used to override any settings of the
+ 'ignore' option in linkgit:git-config[1]. When
"untracked" is used submodules are not considered dirty when they only
contain untracked content (but they are still scanned for modified
content). Using "dirty" ignores all changes to the work tree of submodules,