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

After-the-fact submodule detection or creation

From
MPMichael Poole <mdpoole@troilus.org>
Date
Dec 7, 2007, 03:01 UTC
Message-ID
<87ir3bp5sf.fsf@graviton.dyn.troilus.org>

I have a project where most branches have one subdirectory for the core program and other subdirectories for support scripts, programs and libraries. The supporting subdirectories vary from branch to branch. However, some branches contain just the core program, with no subdirectories. Starting from scratch, I would say the core program should be a submodule, but historically it was not populated as one.

Is there a way to easily create such a pseudo-submodule branch in git, or are real submodules strongly preferred for this kind of scenario?

(The added twist: I ran into this while importing a Subversion repository. git-svn identified two trees of history in the repository -- one history containing the core plus support trees, one history containing just the core program. Since the trees do have the same contents, only the commits are duplicated, but that is not quite ideal.

It seems like using the current submodule code would mean that this kind of import would need two passes over the foreign repository, rather than one if the branch could be created after the parent tree is initially imported. I can live with that -- it is a rather unusual case -- but maybe there is a better way.)

Michael Poole
Next: Alex Riesen
Message 1 of 3 in “After-the-fact submodule detection or creation”
  1. Michael PooleDec 7, 2007
  2. Alex RiesenDec 7, 2007
  3. Michael PooleDec 7, 2007

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.