git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Miklos Vajna <vmiklos@frugalware.org>
To: Heikki Orsila <heikki.orsila@iki.fi>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Add SVN->Git conversion example to documentation
Date: Sun, 15 Jun 2008 00:47:58 +0200	[thread overview]
Message-ID: <20080614224758.GL29404@genesis.frugalware.org> (raw)
In-Reply-To: <20080614215812.GA28574@zakalwe.fi>

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

On Sun, Jun 15, 2008 at 12:58:12AM +0300, Heikki Orsila <heikki.orsila@iki.fi> wrote:
> +After that, the new repository should be cleaned, and fetch heads should
> +be set.
> +------------------------------------------------------------------------
> +	cd foo.git/.git

Heh, I was confused. foo.git is usually a bare repo, if the repo has a
working directory as well, then just call it foo.

And then: if you convert an svn repo to a git one, don't you want to
convert it to a bare repo?

I haven't tried git-svn clone but the following will work for sure:

git --bare init
git --bare svn init -s URL
git --bare svn fetch

> +	rm -rf svn
> +	git config --remove-section svn-remote.svn
> +	git config remote.origin.url .
> +	git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
> +	git config --add remote.origin.fetch +refs/remotes/*:refs/heads/*
> +	git fetch
> +	git gc

If you remove the svn dir, why don't you remove refs/remotes as well?
(Probably via update-ref since git svn will pack refs before it ends for
big repos, I think.)

Also I think it would be a good idea to give a hint how to do
incremental updates. Something like not deleting the svn dir and using
git --bare svn fetch; git fetch.

PS: I'm not a git-svn contributor or anything, just thought I give you
some advices, I hope it helped. :-)

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-06-14 22:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14 21:58 [PATCH] Add SVN->Git conversion example to documentation Heikki Orsila
2008-06-14 22:47 ` Miklos Vajna [this message]
2008-06-17 23:21 ` Junio C Hamano
2008-06-18  0:55   ` Heikki Orsila
  -- strict thread matches above, loose matches on Subject: below --
2008-06-14 18:09 Heikki Orsila
2008-06-14 19:06 ` Miklos Vajna
2008-06-14 21:50   ` Heikki Orsila
2008-06-14 18:03 Heikki Orsila
2008-06-15 13:17 ` Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080614224758.GL29404@genesis.frugalware.org \
    --to=vmiklos@frugalware.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=heikki.orsila@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).