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

Re: [RFC] Submodules in GIT

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 28, 2006, 20:41 UTC
Message-ID
<Pine.LNX.4.64.0611281407370.20138@iabervon.org>
In-Reply-To
<20061128190618.GB12463MdfPADPa@greensroom.kotnet.org>
On Tue, 28 Nov 2006, Sven Verdoolaege wrote:
Show 8 quoted lines
> On Tue, Nov 28, 2006 at 01:37:54PM -0500, Daniel Barkalow wrote:
> > If submodule was the only thing that got changed, it's not dirty; if it 
> > were dirty, some of its contents would also have gotten changed.
> 
> For me, the commit is the only "content" of the subproject that the
> superproject should care about, so the submodule being dirty or not
> is completely irrelevant (for committing), but it seems you see the
> subproject more as a (working) tree than as a commit.
I think we agree on the tree/commit/object database model part.

I think we disagree on how the working *directories* relate. I see the checked-out state of a submodule as being relevant to the checked-out state of the supermodule, such that dirty state in the submodule directory is dirty state in the supermodule directory.

Show 7 quoted lines
> > Surely:
> > 
> > "git commit submodule/foo bar"
> 
> I wouldn't dream of doing such an operation, because it doesn't make
> sense to me.  (So as far as I'm concerned, you can make it do whatever
> you'd like it to do.)  You can only commit the subproject as a whole.

I'm thinking that users of subprojects will often want to work on the subprojects rather than exclusively using commits prepared by other people, and it's too much trouble to have to do the work in a repository for just the subproject and pull it into the superproject's submodule to test it. So the submodule working directory needs to function as a working directory for the subproject. Then

  "cd submodule; git commit foo"
does the obvious thing, but that should be the same as
  "git commit submodule/foo" (since it normally is)

and then it makes sense to let you do multiple commits with a single command when the paths end in different modules, since that's obviously what you're requesting, and then -a must do all of them.

	-Daniel
Previous: Sven VerdoolaegeNext: Shawn Pearce
Message 42 of 82 in “Re: [RFC] Submodules in GIT”
  1. Jakub NarebskiNov 20, 2006
  2. Martin WaitzNov 20, 2006
  3. Junio C HamanoNov 20, 2006
  4. Jakub NarebskiNov 20, 2006
  5. Martin WaitzNov 20, 2006
  6. Sam VilainNov 21, 2006
  7. Linus TorvaldsNov 20, 2006
  8. J. Bruce FieldsNov 20, 2006
  9. Martin WaitzNov 20, 2006
  10. J. Bruce FieldsNov 21, 2006
  11. Martin WaitzNov 21, 2006
  12. Martin WaitzNov 20, 2006
  13. Junio C HamanoNov 21, 2006
  14. Jakub NarebskiNov 21, 2006
  15. Martin WaitzNov 21, 2006
  16. Jakub NarebskiNov 21, 2006
  17. Martin WaitzNov 21, 2006
  18. Martin WaitzNov 21, 2006
  19. Junio C HamanoNov 21, 2006
  20. Martin WaitzNov 21, 2006
  21. Yann DirsonNov 21, 2006
  22. Linus TorvaldsNov 21, 2006
  23. Linus TorvaldsNov 21, 2006
  24. Yann DirsonNov 21, 2006
  25. Shawn PearceNov 22, 2006
  26. Yann DirsonNov 23, 2006
  27. Shawn PearceNov 25, 2006
  28. Yann DirsonNov 25, 2006
  29. Linus TorvaldsNov 25, 2006
  30. Steven GrimmNov 25, 2006
  31. Linus TorvaldsNov 25, 2006
  32. Yann DirsonNov 25, 2006
  33. Sven VerdoolaegeNov 26, 2006
  34. Yann DirsonNov 26, 2006
  35. Linus TorvaldsNov 26, 2006
  36. Daniel BarkalowNov 26, 2006
  37. Andreas EricssonNov 28, 2006
  38. Daniel BarkalowNov 28, 2006
  39. Sven VerdoolaegeNov 28, 2006
  40. Daniel BarkalowNov 28, 2006
  41. Sven VerdoolaegeNov 28, 2006
  42. Daniel BarkalowNov 28, 2006
  43. Shawn PearceNov 28, 2006
  44. Daniel BarkalowNov 28, 2006
  45. Linus TorvaldsNov 28, 2006
  46. Stephan FederNov 30, 2006
  47. Andy ParkinsNov 30, 2006
  48. Sven VerdoolaegeNov 30, 2006
  49. Andy ParkinsNov 30, 2006
  50. Andreas EricssonNov 30, 2006
  51. Andy ParkinsNov 30, 2006
  52. Sven VerdoolaegeNov 30, 2006
  53. Andy ParkinsDec 1, 2006
  54. Jakub NarebskiDec 1, 2006
  55. Sven VerdoolaegeDec 1, 2006
  56. Andy ParkinsDec 1, 2006
  57. Martin WaitzNov 30, 2006
  58. sfNov 30, 2006
  59. sfNov 30, 2006
  60. Andy ParkinsDec 1, 2006
  61. Martin WaitzDec 1, 2006
  62. Andy ParkinsDec 1, 2006
  63. Sven VerdoolaegeDec 1, 2006
  64. Andy ParkinsDec 1, 2006
  65. Sven VerdoolaegeDec 1, 2006
  66. sfDec 1, 2006
  67. Andy ParkinsDec 1, 2006
  68. Martin WaitzDec 1, 2006
  69. Andy ParkinsDec 1, 2006
  70. Martin WaitzDec 1, 2006
  71. Martin WaitzDec 1, 2006
  72. Andy ParkinsDec 1, 2006
  73. Martin WaitzDec 1, 2006
  74. Andy ParkinsDec 1, 2006
  75. Martin WaitzDec 1, 2006
  76. Martin WaitzDec 1, 2006
  77. Andy ParkinsDec 1, 2006
  78. Martin WaitzDec 1, 2006
  79. Jakub NarebskiDec 2, 2006
  80. Andy ParkinsDec 1, 2006
  81. Andreas EricssonDec 1, 2006
  82. Andy ParkinsDec 1, 2006

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.