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

Re: [PATCH] builtin/describe.c: ignore untracked changes in submodules

From
Jens Lehmann <jens.lehmann@web.de>
Date
Sep 13, 2010, 17:59 UTC
Message-ID
<503065167.8606900.1284400767803.JavaMail.fmail@mwmweb047>
In-Reply-To
<AANLkTinMf-_vk2-gRazf-8FNykZoNbVwmu_+c+5ht8rY@mail.gmail.com>
>Do you agree that there is an inconsistency between how untracked content is
>treated at the super-project level and at the submodule level? 

Yes, but I - and others included in that discussion some time ago - could not come up with a sane and simple solution to that problem.

> Any thoughts
>about how the behavior should be made to be consistent?
The core of this issue is that for git a file is either untracked, modified or clean.
But submodules can have every combination of all these states - as they consist
of multiple files - and additionally their HEAD can differ from the commit recorded
in the superproject. So basically I see two ways to handle that:
a) add new states for an entry to represent all missing combinations of possible
   states for submodules and tell all porcelain to handle these.
b) simplify this problem by having a submodule show up as modified when
   either of these three conditions are met (and enable the user to choose what
   conditions she wants to see and what not).

Obviously a) will complicate all git by a large degree just for the sake of submodules. I am arguing for b), because submodules itself can be seen as a bunch of files which don't interest me as single entities until I want to take a closer look. I think the issue we are discussing here is the price we have to pay for this abstraction. I am very open to proposals how to better handle that but so far I haven't seen any.

>Perhaps the default setting of submodule.<name>.ignore should be 'untracked'?

I still vote for none. I think the default should be to not have untracked files in your projects (like you should not have warnings when compiling your project). If that is not wanted, just use the configuration options git provides to change it.

Previous: Brandon CaseyNext: yj2133011
Message 5 of 14 in “builtin/describe.c: ignore untracked changes in submodules”
  1. builtin/describe.c: ignore untracked changes in submodulesBrandon Casey, Sep 9, 2010
  2. Junio C HamanoSep 10, 2010
  3. Jens LehmannSep 10, 2010
  4. Brandon CaseySep 12, 2010
  5. Jens LehmannSep 13, 2010
  6. yj2133011Sep 12, 2010
  7. Jens LehmannSep 11, 2010
  8. Junio C HamanoSep 11, 2010
  9. Jens LehmannSep 11, 2010
  10. Junio C HamanoSep 12, 2010
  11. Junio C HamanoSep 12, 2010
  12. Jens LehmannSep 13, 2010
  13. Junio C HamanoSep 13, 2010
  14. Jens LehmannSep 14, 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.