summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Sangeeta Jain <sangunb09@gmail.com>2020-11-10 14:09:00 +0530
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-08 14:27:35 -0800
commit8ef93124645f89c45c9ec3edd3b268b38154061a (patch)
tree6b5f8460317e3fa87f4b3ddd68541ff8f1ef656b /Documentation
parentSync with Git 2.29.1 (diff)
downloadtgif-8ef93124645f89c45c9ec3edd3b268b38154061a.tar.xz
diff: do not show submodule with untracked files as "-dirty"
Git diff reports a submodule directory as -dirty even when there are only untracked files in the submodule directory. This is inconsistent with what `git describe --dirty` says when run in the submodule directory in that state. Make `--ignore-submodules=untracked` the default for `git diff` when there is no configuration variable or command line option, so that the command would not give '-dirty' suffix to a submodule whose working tree has untracked files, to make it consistent with `git describe --dirty` that is run in the submodule working tree. And also make `--ignore-submodules=none` the default for `git status` so that the user doesn't end up deleting a submodule that has uncommitted (untracked) files. Signed-off-by: Sangeeta Jain <sangunb09@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/diff.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt
index c3ae136eba..2d3331f55c 100644
--- a/Documentation/config/diff.txt
+++ b/Documentation/config/diff.txt
@@ -85,6 +85,8 @@ diff.ignoreSubmodules::
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.
+ By default this is set to untracked so that any untracked
+ submodules are ignored.
diff.mnemonicPrefix::
If set, 'git diff' uses a prefix pair that is different from the