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

Re: Initial support for cloning submodules

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
May 5, 2007, 08:14 UTC
Message-ID
<20070505081404.GR955MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<7vfy6cqk0w.fsf@assigned-by-dhcp.cox.net>
On Fri, May 04, 2007 at 03:52:15PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> I do not like the Porcelain part very much, though.  I do not
> think we would want to add anything new to git-clone.  We should
> lose as much code from git-clone that is common with git-fetch
> as we can first, and add new features to git-fetch, with
> possibly passthru options added to git-clone as needed (e.g. a
> new --submodule option).
So what would you want to keep in git-clone ?
Show 6 quoted lines
> If you --submodule cloned a remote repository when it had two
> submodules, and then later the remote adds another submodule,
> you would need to have a way to fetch that can discover the
> presense of the new submodule and add it for you, and at that
> point, having the code that knows much about submodules in clone
> would not help you much.
True.
Show 7 quoted lines
>  (3) "git-fetch --submodules", after finishing what it would do
>      without "--submodules" option, would inspect the fetched
>      tree (or the index derived from it), find the tree entries
>      with mode 160000 (i.e. submodule graft points), and _then_
>      uses the pathnames of these tree entries to consult the
>      config mechanism to see which URL(s) can be used to
>      retrieve them, probably only for new submodules.
Would git-fetch then call git-clone for these new submodules?
Show 5 quoted lines
> Having a generic program and protocol to
> dump the whole configuration file is certainly simpler, easier
> to debug, and easier to repurpose, it makes me somewhat worried
> about security implications (if it is open to http then worrying
> about it is not very useful, though).

We could easily have dump-config only dump a predefined "known safe" set of config options, although that would mean you have to upgrade the server side each time you add a new dumpable config option. Or we could do the preselection only when called from git-daemon.

skimo
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 14 in “Initial support for cloning submodules”
  1. Sven VerdoolaegeMay 4, 2007
  2. 1/5 Add dump-configSven Verdoolaege, May 4, 2007
  3. 2/5 git-config: add --remote option for reading config from remote repoSven Verdoolaege, May 4, 2007
  4. Frank LichtenheldMay 4, 2007
  5. Sven VerdoolaegeMay 4, 2007
  6. Frank LichtenheldMay 4, 2007
  7. 3/5 http.h: make fill_active_slots a function pointerSven Verdoolaege, May 4, 2007
  8. 4/5 git-config: read remote config files over HTTPSven Verdoolaege, May 4, 2007
  9. 5/5 git-clone: add --submodules for cloning submodulesSven Verdoolaege, May 4, 2007
  10. Junio C HamanoMay 4, 2007
  11. Sven VerdoolaegeMay 5, 2007
  12. Junio C HamanoMay 5, 2007
  13. Alon ZivMay 6, 2007
  14. Sven VerdoolaegeMay 18, 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.