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

Re: svn:externals using git submodules

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
May 1, 2007, 22:19 UTC
Message-ID
<alpine.LFD.0.98.0705011512300.3808@woody.linux-foundation.org>
In-Reply-To
<20070501202356.GA25531@pe.Belkin>
On Tue, 1 May 2007, Chris Shoemaker wrote:
Show 5 quoted lines
> 
> Making git-svn handle svn:externals with specified revisions would be
> _quite_ useful.  There's a special-case of this that I use personally:
> svn:externals that point to other paths (and other revisions) of the
> parent repo.

Side note: even _without_ a specified revision, I think it's quite sane to have the rule that a submodule hash of all zeroes is "unversioned".

Such a submodule is still _useful_: while the tree itself contains no information (and it SHOULD NOT do so, since the actual location of the external module may not be globally stable or visible!), it would basically act like subversion externals together with the ".gitmodules" file that contains that information.

So while the git submodule thing was designed to specify specific revisions, there's nothing that really technically _requires_ it. The exact SHA1 details in the submodule link are going to be up to the higher-level user anyway.

(Of course, if you actually have a "all zeroes" gitlink entry, and then have a checked-out git tree at that entry, "git status" and "git diff" would show it as needing update. I think that's _correct_, but if we want to shut it up for the special case of all-zero SHA1, we trivially could).

But while I'm encouraged that the whole gitlink thing seems to be working for Andy, and some others are playing with it too, I'm also a bit discouraged by the fact that there hasn't been any noise or work on the porcelain side. I was obviously optimistic and hoping we'd see support in checkout/diff, but I haven't heard anybody talk about actually implementing .gitmodules and the porcelain support that uses them..

			Linus
Previous: Chris ShoemakerNext: Junio C Hamano
Message 11 of 14 in “svn:externals using git submodules”
  1. Andy ParkinsMay 1, 2007
  2. Chris ShoemakerMay 1, 2007
  3. Shawn O. PearceMay 1, 2007
  4. Chris ShoemakerMay 1, 2007
  5. Shawn O. PearceMay 1, 2007
  6. Andy ParkinsMay 1, 2007
  7. Andy ParkinsMay 1, 2007
  8. Chris ShoemakerMay 1, 2007
  9. Andy ParkinsMay 1, 2007
  10. Chris ShoemakerMay 1, 2007
  11. Linus TorvaldsMay 1, 2007
  12. Junio C HamanoMay 1, 2007
  13. Shawn O. PearceMay 1, 2007
  14. Michel JouvinJan 20, 2010

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.