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
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2010, 06:43 UTC
Message-ID
<7vvddcd1si.fsf@alter.siamese.dyndns.org>
In-Reply-To
<fabb9a1e1003032236x59a781b8ne0266877db25d001@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 5 quoted lines
> Yes, that's what I came up with after sending my email, commands that
> _default_ to HEAD as revision should instead default to an empty
> commit when there is no HEAD yet. Perhaps something we can add to
> parse_opt and then make sure that all commands we care about use that
> feature?

I doubt it would be very much useful as a general feature, as sometimes we default to HEAD because we want a tree-ish (in which case using "empty tree" would be appropriate) and other times because we want an actual commit (e.g. "git commit --amend" should exit, not "amend an empty tree") and we would need to be careful to study each codepath and use the appropriate one.

But you are welcome to try and prove me wrong with a working patch ;-).
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 14 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.