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

Re: [PATCH 0/2] Add optional parameters to the diff option "--ignore-submodules"

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jun 8, 2010, 22:19 UTC
Message-ID
<4C0EC201.9060309@web.de>
In-Reply-To
<201006090011.14995.johan@herland.net>
Am 09.06.2010 00:11, schrieb Johan Herland:
Show 21 quoted lines
> On Tuesday 08 June 2010, Jens Lehmann wrote:
>> After thinking some time about peoples expectations and troubles
>> with the recursive scanning of submodules, I came up with this:
>>
>> What about expanding the "--ignore-submodules" option of the git diff
>> family with three parameters:
>>
>> --ignore-submodules=all : Same behavior as "--ignore-submodules",
>>   submodules show never up as modified.
>>
>> --ignore-submodules=untracked : Don't consider submodules as modified
>>   when they only contain untracked files, but do if the commits in the
>>   superproject are different or tracked content is modified.
>>
>> --ignore-submodules=dirty : Don't consider submodules as modified
>>   when their work tree is dirty, no matter why. This is the pre 1.7.0
>>   behavior and doesn't recurse into submodules at all.
> 
> Pardon my ignorance: Does this make "dirty" a superset of "untracked"? Or 
> are they orthogonal. And how does "all" compare to "dirty"? Are they 
> synonyms, or is "all" a superset of "dirty"?

Sorry I didn't make that clear enough: "all" is a superset of "dirty" and "dirty" is a superset of "untracked".

There are currently (since 1.7.0) three reasons a submodule is considered dirty:

1) It contains untracked content
2) It contains modified tracked content
3) It contains newer commits than those committed in the superproject

"all" would ignore 1), 2) & 3) "dirty" would ignore 1) & 2) "untracked" would ignore 1)

> I agree with adding support for this in .gitmodules, to allow customizing on 
> a per-submodule level.
Yup, and different branches could handle that differently that way too.
Previous: Johan HerlandNext: Johan Herland
Message 12 of 14 in “Add optional parameters to the diff option "--ignore-submodules"”
  1. 0/2 Add optional parameters to the diff option "--ignore-submodules"Jens Lehmann, Jun 8, 2010
  2. 1/2 git diff: rename test that had a conflicting nameJens Lehmann, Jun 8, 2010
  3. 2/2 Add optional parameters to the diff option "--ignore-submodules"Jens Lehmann, Jun 8, 2010
  4. Brandon CaseyJun 24, 2010
  5. Jens LehmannJun 24, 2010
  6. Junio C HamanoJun 8, 2010
  7. Jens LehmannJun 8, 2010
  8. Johannes SchindelinJun 8, 2010
  9. Junio C HamanoJun 8, 2010
  10. Johannes SchindelinJun 8, 2010
  11. Johan HerlandJun 8, 2010
  12. Jens LehmannJun 8, 2010
  13. Johan HerlandJun 8, 2010
  14. Jens LehmannJun 9, 2010

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.