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 9, 2010, 06:23 UTC
Message-ID
<4C0F3355.7050202@web.de>
In-Reply-To
<201006090149.22027.johan@herland.net>
Am 09.06.2010 01:49, schrieb Johan Herland:
Show 10 quoted lines
> On Wednesday 09 June 2010, Jens Lehmann wrote:
>> 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
> 
> I guess 3) really means that the submodule's HEAD points to a _different_ 
> (not necessarily _newer_) commit than what's referenced in the superproject.
Sure, please replace my inaccurate description with yours ;-)
Show 8 quoted lines
>> "all" would ignore 1), 2) & 3)
>> "dirty" would ignore 1) & 2)
>> "untracked" would ignore 1)
> 
> ...and just to complete my understanding of this, 3) requires only checking 
> the submodule's current HEAD, while 1) and 2) require traversing its work 
> tree (i.e. the equivalent of a 'git status'), hence the potential 
> expensiveness.
Thats correct.
> Also, I guess 2) includes both staged and unstaged modifications to tracked 
> content?

Yes (as it doesn't make a difference to the superproject if modifications inside the submodule are staged or not there is no distinction made between those two).

> Thanks for your help. All the ideas in your cover letter seem good to me.
Thank you for your comments, I'll start hacking to show some more patches.
Previous: Johan Herland
Message 14 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.