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

Re: [PATCH] better git-submodule status output

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 6, 2008, 16:29 UTC
Message-ID
<alpine.DEB.1.00.0807061821340.7342@eeepc-johanness>
In-Reply-To
<20080706160758.GA23385@jhaampe.org>
Hi,
On Sun, 6 Jul 2008, Sylvain Joyeux wrote:
Show 7 quoted lines
> > > Which one is the commit message ;-)?
> > 
> > I think it is clear that Sylvain has not read 
> > Documentation/SubmittingPatches yet.
> 
> Sylvain *has* read SubmittingPatches but has not understood every detail 
> of this very long document.

Oh. But you should have already seen on this list that almost everybody puts the oneline as subject, the commit message as first part of the mail body, then a "--", optionally some personal stuff that should not go into the commit message, and then the diffstat and all the rest.

IOW the mail body should look like the output of format-patch, optionally some comments between "--" and the diffstat.

Write a patch for SubmittingPatches.
 
Show 8 quoted lines
> > If you could enlighten me on what is wrong ...
> 
> > > People who rely on working submodule support, do you have any 
> > > feedback on this patch?
> > 
> > Not yet.  Will test/comment when the spurious "fetch" is fixed.
>
> I thought that the only thing that 'fetch' does is update FETCH_HEAD.
Uhoh.  'fetch' fetches.  Which means it does not only update something.
> My problem is that doing the fetch is the only way to know what is the 
> status of the submodule w.r.t. the registered commit. If you have a 
> better way to get that information, I'm all ears :P

Are you sure that you understand the submodule thing enough to patch git-submodule?

There are three states that are interesting:
- the committed submodule state:
  You get this in the superproject by "git ls-tree HEAD -- <dir>"
- the local HEAD of the submodule:
  (cd "<dir>" && git rev-parse --verify HEAD)
- the HEAD of the default branch of the upstream repository of the 
  submodule:
  (cd "<dir>" && git ls-remote origin HEAD)
  NOTE: this does not have to do _anything_ with the submodule: you can 
  easily have two independent branches (see "html" and "next" in git.git), 
  and the submodule is free to be pinned to whatever commit is available
  in the upstream repository.
  It is even possible that it is pinned to a commit that is only reachable 
  from a tag, not from a branch.

Hth, Dscho

Previous: Sylvain JoyeuxNext: Sylvain Joyeux
Message 5 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.