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

Re: What should "git submodule summary" give before an initial commit?

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Mar 4, 2010, 06:01 UTC
Message-ID
<fabb9a1e1003032201l38b052ebk4c0061e9d40f68b6@mail.gmail.com>
In-Reply-To
<4B8F00AA.5050007@web.de>
Heya,
On Thu, Mar 4, 2010 at 01:36, Jens Lehmann <Jens.Lehmann@web.de> wrote:
> But to make "git status" with status.submodulesummary work as expected,
> i need something like the following patch on top of current pu (because
> "git submodule summary --cached HEAD" returns no changes in a freshly
> created repo):

I think the problem is deeper than that: git doesn't work that great if there's no HEAD yet. Some of our features don't work (as expected) if there's no HEAD. For example, 'git reset' doesn't work, of course, I can use 'git rm --cached .' to achieve the same effect (since all staged changes are guaranteed to be adds), but its' not quite the same. Perhaps it's an idea to look at how we handle not having a head across the board and deal with it at a higher level? Something like pretending we do have a HEAD that's pointing at the empty tree when on an unborn branch might fix 'git reset' (although I'm sure there's all kinds of objections to actually doing that, I'm not suggesting that's what we should do, but that's the kind of solution I think we should look at).

-- 
Cheers,

Sverre Rabbelier
Previous: Jens LehmannNext: Junio C Hamano
Message 11 of 17 in “Latest master failing t7401 submodule tests”
  1. A Large Angry SCMMar 3, 2010
  2. Junio C HamanoMar 3, 2010
  3. Jeff KingMar 3, 2010
  4. Junio C HamanoMar 3, 2010
  5. Jeff KingMar 3, 2010
  6. Junio C HamanoMar 3, 2010
  7. Junio C HamanoMar 3, 2010
  8. What should "git submodule summary" give before an initial commit?Junio C Hamano, Mar 3, 2010
  9. Johan HerlandMar 3, 2010
  10. Jens LehmannMar 4, 2010
  11. Sverre RabbelierMar 4, 2010
  12. Junio C HamanoMar 4, 2010
  13. Sverre RabbelierMar 4, 2010
  14. Junio C HamanoMar 4, 2010
  15. Sverre RabbelierMar 4, 2010
  16. Jeff KingMar 3, 2010
  17. Junio C HamanoMar 3, 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.