summaryrefslogtreecommitdiff
path: root/Documentation/user-manual.txt
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2010-02-01 18:09:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-01 20:08:12 (GMT)
commit8d9e7d5293d6a8b50c9e0eb8e23ef5fed45c86d0 (patch)
treec75d2289aed0acef0ec1ce7cbcfa1651172e04f7 /Documentation/user-manual.txt
parentc0da5db1e692c2bc74e5cdba67baf8762ac304b4 (diff)
downloadgit-8d9e7d5293d6a8b50c9e0eb8e23ef5fed45c86d0.zip
git-8d9e7d5293d6a8b50c9e0eb8e23ef5fed45c86d0.tar.gz
git-8d9e7d5293d6a8b50c9e0eb8e23ef5fed45c86d0.tar.bz2
Updates for dirty submodules in release notes and user manual
In the release notes "git status" was not mentioned, also shortly explain the "-dirty" output generated by diff. Added a paragraph to the "Pitfalls with submodules" section in user-manual.txt describing new and old behavior of "git status" and "git diff" for dirty submodules. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/user-manual.txt')
-rw-r--r--Documentation/user-manual.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 517daca..fe6fb72 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -3640,6 +3640,26 @@ Did you forget to 'git add'?
Unable to checkout '261dfac35cb99d380eb966e102c1197139f7fa24' in submodule path 'a'
-------------------------------------------------
+In older git versions it could be easily forgotten to commit new or modified
+files in a submodule, which silently leads to similar problems as not pushing
+the submodule changes. Starting with git 1.7.0 both "git status" and "git diff"
+in the superproject show submodules as modified when they contain new or
+modified files to protect against accidentally committing such a state. "git
+diff" will also add a "-dirty" to the work tree side when generating patch
+output or used with the --submodule option:
+
+-------------------------------------------------
+$ git diff
+diff --git a/sub b/sub
+--- a/sub
++++ b/sub
+@@ -1 +1 @@
+-Subproject commit 3f356705649b5d566d97ff843cf193359229a453
++Subproject commit 3f356705649b5d566d97ff843cf193359229a453-dirty
+$ git diff --submodule
+Submodule sub 3f35670..3f35670-dirty:
+-------------------------------------------------
+
You also should not rewind branches in a submodule beyond commits that were
ever recorded in any superproject.