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

Re: Making submodules easier to work with

From
RSRoman Shaposhnik <rvs@sun.com>
Date
May 6, 2008, 23:47 UTC
Message-ID
<1210117622.25663.1110.camel@work.sfbay.sun.com>
In-Reply-To
<32541b130805011255t4b37a73cx9d670b9250e787c6@mail.gmail.com>
On Thu, 2008-05-01 at 15:55 -0400, Avery Pennarun wrote:
Show 18 quoted lines
> >  o Branching "crawler" means branching "os-lib"
> >  o You can send a patch that contains changes both to "crawler" and "os-lib"
> >   and get it applied in a resonable way as ONE modification (and git-am
> >   would do the right thing)
> >  o Merging branch a and branch b in "crawler" also merges the matching
> >   branches a and b in "os-lib".
> >  o Pushing the supermodule also pushes the submodules
> 
> The above would fit fine into my workflow, although it might be more
> fancy than I really need.  Personally, I don't mind thinking of my
> submodules as separate projects (ie. I should expect to commit,
> branch, merge, and push separately).  But if the above features
> existed I would adjust my working style to use them, just for the
> added day-to-day convenience factor.
> 
> Doing things like a single patch against one repo is a bit messy,
> because (presumably) you'd have the same commit message in both repos,
> which wouldn't really make sense.

May be my brain is saturated with "partial cloning" but somehow the following looks like an interesting twist on a decentralized SCM: imagine that the picture given by Finn Arne Gangstad weren't static. IOW, os-lib wasn't really a separate component to begin with but was first developed as part of a "crawler" and only when the other team started to implement "indexer" there was a need for os-lib to be shared between two independent projects. Is there any nice way to express such a dynamic history sharing, short of truly refactoring os-lib into a separate Git repository and treating it either as a submodule or a subtree-merge?

Thanks, Roman.

Previous: Avery PennarunNext: Avery Pennarun
Message 17 of 22 in “Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules)”
  1. Tim HarperApr 30, 2008
  2. Tim HarperApr 30, 2008
  3. Andreas EricssonApr 30, 2008
  4. Johannes SchindelinApr 30, 2008
  5. Avery PennarunApr 30, 2008
  6. Ping YinApr 30, 2008
  7. Roman ShaposhnikApr 30, 2008
  8. Avery PennarunApr 30, 2008
  9. Tim HarperApr 30, 2008
  10. Avery PennarunApr 30, 2008
  11. Tim HarperApr 30, 2008
  12. Avery PennarunApr 30, 2008
  13. Roman ShaposhnikApr 30, 2008
  14. Avery PennarunApr 30, 2008
  15. Finn Arne GangstadMay 1, 2008
  16. Avery PennarunMay 1, 2008
  17. Roman ShaposhnikMay 6, 2008
  18. Avery PennarunMay 7, 2008
  19. Ping YinMay 8, 2008
  20. Steven GrimmMay 1, 2008
  21. Roman ShaposhnikMay 6, 2008
  22. Ping YinMay 1, 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.