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

Re: submodule add does not consider git svn

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 23, 2011, 18:19 UTC
Message-ID
<4E2B10B7.3010903@web.de>
In-Reply-To
<CAJs9aZ9cMZd5PfOW7Zfza3un5JqKRM5eQdDpKPCWvLn-vkzktA@mail.gmail.com>
Am 23.07.2011 05:33, schrieb rupert THURNER:
Show 24 quoted lines
> it seems that "git submodule add" looses information from "git svn
> clone". what am i missing here which would allow to "git svn rebase"
> the repository, even if it is newly added as submodule?
>
> the following example takes a little, as the repository has 15'000
> revisions, even 99% do not concern the checked out part.
> 
> rupert @ login : ~/tmp/subm-bug
>  mkdir -p  ~/tmp/subm-bug
>  cd ~/tmp/subm-bug
>  git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk
> GeoIP
>  git init test
>  cd test
>  git submodule add ~/tmp/subm-bug/GeoIP
>  cd GeoIP
>  git svn rebase
> 
> Migrating from a git-svn v1 layout...
> Data from a previous version of git-svn exists, but
>         .git/svn
>         (required for this version (1.7.5.4) of git-svn) does not exist.
> Done migrating from a git-svn v1 layout
> Unable to determine upstream SVN information from working tree history

That is because in your example "git submodule add" clones that repo *again* from where you put it using "git svn clone". I am not really familiar with git svn, but I assume it is intended that when you clone such a repo it "forgets" that it was connected with a svn repo. Try the following instead:

git init test cd test git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk GeoIP git submodule add ./GeoIP # Add existing git svn repo GeoIP in place cd GeoIP git svn rebase

Of course when you push that submodule somewhere else using git I expect that "git svn rebase" won't work when you clone that somewhere else, just like it happened in your example.

Previous: rupert THURNERNext: rupert THURNER
Message 2 of 4 in “submodule add does not consider git svn”
  1. rupert THURNERJul 23, 2011
  2. Jens LehmannJul 23, 2011
  3. rupert THURNERJul 24, 2011
  4. Jens LehmannJul 24, 2011

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.