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

Subproject clones

From
AWAmos Waterland <apw@us.ibm.com>
Date
May 12, 2007, 01:16 UTC
Message-ID
<20070512011600.GA24354@us.ibm.com>

The logic in t3040-subprojects-basic.sh assumes that comparing the output of 'git-ls-files -s' when run in the original superproject and when run in the cloned superproject is a good test that cloning worked.

However, the output of git-ls-files does not include the files in subprojects, so this test passes, even though the clone contains only the directories of the subprojects and none of their containing files or .git subdirectories.

In other words, given this:
 superproject
  sub1
   Makefile
  sub2
   Makefile

when somebody does `git-clone superproject', I believe they expect to get the same tree. Instead, they get this:

 superproject
  sub1
  sub2

Note that `git-clone superproject/sub1` works as expected, but this sequence fails:

 git-clone superproject foo 
 cd foo
 git-clone ../superproject/sub1
As does this sequence:
 git-clone superproject foo 
 cd foo/sub1
 git-pull ../superproject/sub1

So there is no way that I can see to actually clone a project that has subprojects.

Is this intentional?  Shouldn't clone get the entire superproject?
Next: Junio C Hamano
Message 1 of 4 in “Subproject clones”
  1. Amos WaterlandMay 12, 2007
  2. Junio C HamanoMay 12, 2007
  3. Junio C HamanoMay 12, 2007
  4. Sven VerdoolaegeMay 12, 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.