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

Re: Unmodified submodules shows up as dirty with 1.6.6.443.gd7346

From
Jacob Helwig <jacob.helwig@gmail.com>
Date
Jan 19, 2010, 14:31 UTC
Message-ID
<8c9a061001190631rb1f9518sff337e07e0a6803@mail.gmail.com>
In-Reply-To
<4B555BA1.90605@viscovery.net>
On Mon, Jan 18, 2010 at 23:13, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 12 quoted lines
> Jacob Helwig schrieb:
>> If there is no output from git status in the submodule, then git
>> status in the superproject shows the submodule as being clean.
>> However, if there is _any_ output from git status (untracked files,
>> modified files, deleted files, new files), then the superproject shows
>> the submodule as being dirty.
>
> But isn't it a bug that a submodule is considered dirty just because an
> untracked file appears?
>
> -- Hannes
>
I wouldn't consider it a bug, but that's specific to my use case of submodules.

At work, we're using them for shared Perl libraries between projects. The only reason we have for creating new, untracked files in the submodule is that we're adding new library code. Having the submodule show up as dirty for us is another safety towards not forgetting to commit & push out this new code.

I agree that this isn't intuitive given how status normally handles files in projects, but it makes sense (to me, anyway), when dealing with library code.

Should this be the default behavior for everyone? I can't say. If it's not, I would at least like it to be behavior that you can opt-in to.

-Jacob
Previous: Gustaf HendebyNext: Junio C Hamano
Message 10 of 11 in “Unmodified submodules shows up as dirty with 1.6.6.443.gd7346”
  1. Gustaf HendebyJan 18, 2010
  2. Jacob HelwigJan 18, 2010
  3. Gustaf HendebyJan 18, 2010
  4. Jacob HelwigJan 18, 2010
  5. Gustaf HendebyJan 18, 2010
  6. Junio C HamanoJan 18, 2010
  7. Jens LehmannJan 18, 2010
  8. Johannes SixtJan 19, 2010
  9. Gustaf HendebyJan 19, 2010
  10. Jacob HelwigJan 19, 2010
  11. Junio C HamanoJan 19, 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.