Re: git-svn clone duplicates content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2008.03.13 10:52:15 +0100, martin f krafft wrote:
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux