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

Re: Notes on Using Git with Subprojects

From
RDRogan Dawes <lists@dawes.za.net>
Date
Sep 27, 2006, 23:55 UTC
Message-ID
<451B0F59.6070901@dawes.za.net>
In-Reply-To
<20060927233639.GE21839@spearce.org>
Shawn Pearce wrote:
Show 10 quoted lines
> 
>  - Higher level projects should drive subprojects.
> 
>    Higher level projects tend to be composed of specific revisions or
>    specific generations of subprojects.
> 
>    Part of the content of the higher level project is just what
>    those subproject specifications are and how those subprojects
>    should appear in a working directory.
> 
Show 7 quoted lines
> 
> I used the term "generation of subprojects" as not everyone wants
> to bind their root project to a specific revision of a subproject.
> Indeed that may not be entirely practical.  Instead just a particular
> lineage of development (e.g. "Version 1.0" vs. "Version 1.2")
> may be all that is needed.
> 

Does it not make sense that a commit of the higher level project should include the contents of its subprojects at that particular moment in time?

e.g. using the previous example of a kernel, apache, glibc, etc

You may track the subprojects using whatever scm applies to THAT subproject. But when you want to record the state of the entire project, you want to include the state of the subprojects. So, your super-project commit would actually recurse down into the working directories of the subprojects and record the state/contents of each file that makes up each of the subprojects.

So, if someone is tracking the overall project, and they do a pull of v1.1 (tag), they will see exactly what v1.1 looked like in your repo.

What this makes me think is that it might be useful to have a mechanism for recalculating the tree-ish of a subdirectory and finding an associated commit, for the case where a subproject is also managed by git.

i.e. given a super-project in this state, and knowing that this subproject is managed by git, which revision of the subproject are we talking about, and can we find a commit that matches this tree-ish? (assuming we have the history of the subproject available, of course)

Regards,
Rogan
Previous: Shawn PearceNext: Shawn Pearce
Message 22 of 39 in “Notes on Using Git with Subprojects”
  1. A Large Angry SCMSep 26, 2006
  2. Johannes SchindelinSep 26, 2006
  3. A Large Angry SCMSep 26, 2006
  4. Johannes SchindelinSep 26, 2006
  5. A Large Angry SCMSep 26, 2006
  6. Daniel BarkalowSep 26, 2006
  7. Shawn PearceSep 26, 2006
  8. A Large Angry SCMSep 26, 2006
  9. Martin WaitzSep 27, 2006
  10. Johannes SchindelinSep 27, 2006
  11. Martin WaitzSep 27, 2006
  12. Johannes SchindelinSep 27, 2006
  13. Sven VerdoolaegeSep 27, 2006
  14. Junio C HamanoSep 27, 2006
  15. Michael S. TsirkinSep 28, 2006
  16. Jeff KingSep 28, 2006
  17. Martin WaitzSep 27, 2006
  18. Johannes SchindelinSep 27, 2006
  19. A Large Angry SCMSep 27, 2006
  20. Johannes SchindelinSep 27, 2006
  21. Shawn PearceSep 27, 2006
  22. Rogan DawesSep 27, 2006
  23. Shawn PearceSep 28, 2006
  24. A Large Angry SCMSep 28, 2006
  25. A Large Angry SCMSep 28, 2006
  26. A Large Angry SCMSep 27, 2006
  27. Jeff KingSep 27, 2006
  28. A Large Angry SCMSep 28, 2006
  29. Jeff KingSep 28, 2006
  30. Shawn PearceSep 28, 2006
  31. Jeff KingSep 28, 2006
  32. Shawn PearceSep 28, 2006
  33. Shawn PearceSep 28, 2006
  34. Johannes SchindelinSep 28, 2006
  35. Martin WaitzSep 28, 2006
  36. A Large Angry SCMSep 28, 2006
  37. Martin WaitzSep 29, 2006
  38. A Large Angry SCMSep 26, 2006
  39. A Large Angry SCMOct 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.