From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] Updates for dirty submodules in release notes and user manual
Date: Mon, 01 Feb 2010 19:09:39 +0100 [thread overview]
Message-ID: <4B6718E3.1060403@web.de> (raw)
In-Reply-To: <7vaavvi4r5.fsf@alter.siamese.dyndns.org>
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>
---
Documentation/RelNotes-1.7.0.txt | 12 +++++++-----
Documentation/user-manual.txt | 20 ++++++++++++++++++++
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/Documentation/RelNotes-1.7.0.txt b/Documentation/RelNotes-1.7.0.txt
index 6510d42..323ae54 100644
--- a/Documentation/RelNotes-1.7.0.txt
+++ b/Documentation/RelNotes-1.7.0.txt
@@ -200,11 +200,13 @@ release, unless otherwise noted.
from non-root dir, 2010-01-26) may be merged to older maintenance
branches.
- * When "git diff" is asked to compare the work tree with something,
- it used to consider that a checked-out submodule with uncommitted
- changes is not modified; this could cause people to forget committing
- these changes in the submodule before committing in the superproject.
- It now considers such a change as a modification.
+ * When using "git status" or asking "git diff" to compare the work tree
+ with something, they used to consider that a checked-out submodule with
+ uncommitted changes is not modified; this could cause people to forget
+ committing these changes in the submodule before committing in the
+ superproject. They now consider such a change as a modification and
+ "git diff" will append a "-dirty" to the work tree side when generating
+ patch output or when used with the --submodule option.
--
exec >/var/tmp/1
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.
--
1.7.0.rc1.156.g05baa
prev parent reply other threads:[~2010-02-01 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-30 22:53 [ANNOUNCE] Git 1.7.0.rc1 Junio C Hamano
2010-01-31 1:12 ` Sverre Rabbelier
2010-01-31 7:56 ` Ilari Liusvaara
2010-01-31 3:52 ` Anders Kaseorg
2010-01-31 7:32 ` Jeff King
2010-01-31 8:03 ` Junio C Hamano
2010-01-31 9:14 ` Jeff King
2010-01-31 19:23 ` Junio C Hamano
2010-01-31 9:36 ` Matthieu Moy
2010-01-31 18:28 ` Junio C Hamano
2010-02-01 18:09 ` Jens Lehmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6718E3.1060403@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).