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

Re: git-svn clone duplicates content

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Mar 13, 2008, 11:30 UTC
Message-ID
<20080313113013.GA31522@atjola.homenet>
In-Reply-To
<20080313095215.GA22241@piper.oerlikon.madduck.net>
On 2008.03.13 10:52:15 +0100, martin f krafft wrote:
Show 25 quoted lines
> Hi list,
> 
> if I
> 
>   git-svn clone --stdlayout svn://svn.debian.org/svn/python-modules/packages/python-docutils
> 
> then I get
> 
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 debian/
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/
>   drwx------ 3 madduck madduck 4096 2008-03-13 10:11 trunk/debian/
> 
> and the diff between the two debian directories is equivalent to the
> last commit to the trunk. If I create a new branch off the remote
> 'trunk' branch, then the trunk/ directory will be gone, as it
> should.
> 
> I am a bit wary to dcommit off anything else than master though for
> I've already killed SVN repos with git-svn in the past. I'd rather
> not to that to Debian's python-modules repo, or else would have to
> spend the rest of my life hidden on some island.
> 
> It seems that master is branched off a tag in this case.
> Does anyone have an idea what's going on?
> Is this something weird in the svn or with git-svn?

The "fetch" part of git-svn will create a master branch if it doesn't exist(*) and makes it point to whatever branch was last fetched. In your case, it seems that the last change on the svn side was to create tag 0.4-5, so master pointed to that one.

As things are, a "git reset --hard remotes/trunk" (or wherever you want your master to descend from) is pretty mandatory after git svn clone. The example in the man page "kind of" mentions that. ;-)

Björn
(*) Which can be a bit "surprising", because even if you don't want a
    master branch and deleted the original one, the next fetch will
    create a new one.
Previous: martin f krafftNext: martin f krafft
Message 2 of 3 in “git-svn clone duplicates content”
  1. martin f krafftMar 13, 2008
  2. Björn SteinbrinkMar 13, 2008
  3. martin f krafftMar 13, 2008

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.