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

Re: git-status and git-diff now very slow in project with a submodule

From
Jens Lehmann <jens.lehmann@web.de>
Date
May 22, 2010, 12:08 UTC
Message-ID
<4BF7C946.1040000@web.de>
In-Reply-To
<AANLkTilctjct-a911H14XMnaBydYR1I6lPbEuFThTJ99@mail.gmail.com>
Am 21.05.2010 14:52, schrieb Leo Razoumov:
> On 2010-05-20, Junio C Hamano <gitster@pobox.com> wrote:
> I would be interested to know of any counter-example: that is, a
> use-case where it makes logical sense to declare a repo dirty when it
> gets an untracked file not mentioned in .gitignore.

For submodules the presence of untracked files must be visible in the superproject. When new files are added to a submodule but the user forgot to commit them, the superproject might not even build at all when another developer clones the superproject. And yes, this is a real-life use case from my dayjob.

The alternative to these broader definitions about when to declare a submodule dirty (new commits, modified content and untracked content) would have been to handle all eight combinations of these states. In all relevant parts of the toolchain. Which seems pretty insane. So the submodule shows up as modified; and all but the short outputs of diff and status also tell you /why/ it is considered modified. So the user can decide what to do about that.

Previous: Jens Lehmann
Message 16 of 16 in “git-status and git-diff now very slow in project with a submodule”
  1. Andy ParkinsMay 20, 2010
  2. Stefan NaeweMay 20, 2010
  3. Andy ParkinsMay 20, 2010
  4. Michael J GruberMay 20, 2010
  5. Andy ParkinsMay 20, 2010
  6. Jens LehmannMay 20, 2010
  7. Andy ParkinsMay 20, 2010
  8. Nguyen Thai Ngoc DuyMay 21, 2010
  9. Junio C HamanoMay 20, 2010
  10. Andy ParkinsMay 20, 2010
  11. Junio C HamanoMay 20, 2010
  12. Jens LehmannMay 21, 2010
  13. Leo RazoumovMay 21, 2010
  14. Andreas SchwabMay 21, 2010
  15. Jens LehmannMay 22, 2010
  16. Jens LehmannMay 22, 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.