git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git diff --numstat <branch> always shows dirty submodules

From
GNGelonida N <gelonida@gmail.com>
Date
Nov 12, 2011, 13:29 UTC
Message-ID
<j9lsc1$4uf$1@dough.gmane.org>
Hi,
I recently started using submodules and they behave mostly as I like to.

Normally I use diff --numstat <branch> to check quickly whether I am aligned with another branch or not.

The (for me) annoying feature of submodules is, that they are always reported to be different due to files, which are not under git.

I type git diff --numstat master I get 1 1 mysubmodule

Now I check the differences with git diff master mysubmodule
diff --git a/mysubmodule b/mysubmodule
index 1382b73..f4f1f1d 160000
--- a/mysubmodule
+++ b/mysubmodule
@@ -1 +1 @@
-Subproject commit xxxxxxxxx
+Subproject commit xxxxxxxxx-dirty

So the only difference (which I wasn't interested in) is, that the
submodule is dirty.


Is there any quick way flag / helper script / . . .
to show differences between two branches without raising the fact, that
submodules are dirty?

>From a user perspective I don't see why this is reported.
I am not being warned about dirty files in the top level repository
Next: Jens Lehmann
Message 1 of 3 in “git diff --numstat <branch> always shows dirty submodules”
  1. Gelonida NNov 12, 2011
  2. Jens LehmannNov 12, 2011
  3. Gelonida NNov 13, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.