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

Re: [PATCH] better git-submodule status output

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 7, 2008, 15:36 UTC
Message-ID
<32541b130807070836n5c6efadu184114f7ed1476e0@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.0807071621300.18205@racer>
On 7/7/08, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
>  On Mon, 7 Jul 2008, Avery Pennarun wrote:
>  > Hmm... how does doing a fetch wreck your state?
>
> It updates the tracking branches.  And guess what I use the tracking
>  branches for?  Yes, to track other people's changes.
>
>  It would wreck my state.
>
>  Anyway, fetch is wrong, wrong, wrong, if all you want to do is see the
>  _state_ of your submodule.
>
>  If that state is that the superproject has a commit that the submodule
>  knows nothing about, then that is _exactly_ what needs to be reported.
>
>  Don't play cute games,
Hmm, somehow we're not understanding each other here.

I think we have already agreed that "git status" and/or "git submodule status" are obviously not good times to be fetching things. And a perfectly valid "submodule status" is that your submodule can't be updated because you're missing some objects and should fetch.

What I suggested was to recursively do "git fetch" in submodules at the time of doing fetch or pull operations on the supermodule, in order to help ensure that all necessary objects have been fetched. To reference an earlier email of yours, this would *improve* git's usability for people who try to use it on a plane, by reducing the number of cases where they have forgotten to fetch.

(1) Do you think fetching missing submodule objects when fetching the supermodule is a bad idea, or a good one? (2) On top of that, do you think updating the submodule's refs when I do "git fetch" in the supermodule is a good one (it seems you think it don't)? (3) And on top of that, if either of those is a good idea, should it be a config option? (4) And should that option default on or off?

In case anyone cares about my preferences, I think (1) makes sense, (2) is probably too dangerous, (3) should be yes, or perhaps people should be taught to run "git submodule fetch" to fetch submodules and leave "git fetch" alone, and (4) if it's configurable, it should do it by default, because in 99% of situations I can imagine, fetching a supermodule and not fetching its referenced submodule commit will not be useful behaviour.

Thanks,
Avery
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 23 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.