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

Re: [PATCH] better git-submodule status output

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 7, 2008, 18:20 UTC
Message-ID
<7v8wwd4kvb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080707145726.GI3696@joyeux>
Sylvain Joyeux <sylvain.joyeux@dfki.de> writes:
> Is it possible to make 'fetch' only .. well .. fetch objects, without
> updating any refs?

Not very easily, and that is very deliberate. The objects fetched will become dangling if you allowed such a mode of operation, and will immediately become subject to gc.

As Avery said, when the user asks "what's the status" in the superproject, "the superproject binds a commit you do not have locally at these paths" is a perfectly valid answer, and as Dscho argues, it is not good to avoid giving that answer by running fetch behind the user's back.

And the thing is, if you do the "without updating refs" fetch, I think you would make things even worse. The superproject status will then may say that you have everything you need, but the commit is not anchored with any ref in the subproject repository and can be gc'ed at any time. The answer you gave to the "status" request cannot be trusted anymore.

By honestly saying "The superproject binds a commit you do not have locally at these paths", the user *can* choose *when* to go there and update, or have "git submodule update" command to that for him.

Previous: Sylvain JoyeuxNext: Avery Pennarun
Message 13 of 34 in “better git-submodule status output”
  1. better git-submodule status outputSylvain Joyeux, Jul 1, 2008
  2. Junio C HamanoJul 6, 2008
  3. Johannes SchindelinJul 6, 2008
  4. Sylvain JoyeuxJul 6, 2008
  5. Johannes SchindelinJul 6, 2008
  6. Sylvain JoyeuxJul 7, 2008
  7. Avery PennarunJul 7, 2008
  8. Johannes SchindelinJul 7, 2008
  9. Johannes SchindelinJul 7, 2008
  10. Sylvain JoyeuxJul 7, 2008
  11. Johannes SchindelinJul 7, 2008
  12. Sylvain JoyeuxJul 7, 2008
  13. Junio C HamanoJul 7, 2008
  14. Avery PennarunJul 7, 2008
  15. Junio C HamanoJul 7, 2008
  16. Sylvain JoyeuxJul 8, 2008
  17. Johannes SchindelinJul 8, 2008
  18. Sylvain JoyeuxJul 8, 2008
  19. Johannes SchindelinJul 8, 2008
  20. Sylvain JoyeuxJul 8, 2008
  21. Avery PennarunJul 7, 2008
  22. Johannes SchindelinJul 7, 2008
  23. Avery PennarunJul 7, 2008
  24. Johannes SchindelinJul 7, 2008
  25. Sylvain JoyeuxJul 7, 2008
  26. Sylvain JoyeuxJul 7, 2008
  27. Mark LevedahlJul 6, 2008
  28. Sylvain JoyeuxJul 9, 2008
  29. Andreas EricssonJul 9, 2008
  30. Sylvain JoyeuxJul 9, 2008
  31. Johannes SchindelinJul 9, 2008
  32. Sylvain JoyeuxJul 9, 2008
  33. Johannes SchindelinJul 9, 2008
  34. Junio C HamanoJul 9, 2008

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.