From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Sébastien Mazy" <melyadon@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: How to prefix existing svn remotes?
Date: Fri, 23 Jan 2009 12:13:18 +0100 [thread overview]
Message-ID: <4979A64E.6030608@drmicha.warpmail.net> (raw)
In-Reply-To: <20090122173211.GB21798@locahost>
Sébastien Mazy venit, vidit, dixit 22.01.2009 18:32:
> Hi all,
>
>
> I created a few months ago a git-svn repository using:
> git svn clone -s https://my_svn_repo .
>
> wich also created the following remotes:
> git branch -r
> branch0
> tags/tag0
> trunk
>
> I would like to prefix theses remotes, so that it shows:
> git branch -r
> prefix/branch0
> prefix/tags/tag0
> prefix/trunk
>
> Of course I should have used the -prefix back when creating the repo but
> it's too late. 'git help svn' doesn't explain how to achieve that and
> simply editing .git/config to add the missing prefix will cause the next
> 'git svn fetch' to download again the whole history (which in my case is
> huge).
>
>
> Is it possible? Did I miss something obvious?
Yes! Depends!
The following works for me:
0) fetch to make sure you're current (optional)
1) edit .git/config and add the prefix (right hand side of the
refpsecs), or really rename in any way you want
2) rename the existing remote branches in the same way
The next git svn fetch will rebuild the map file (which is fast) but not
refetch any svn revisions you already have.
Regarding the renaming: Either I'm dumb or current git branch can't
rename git svn branches. I guess it's because they are remotes but not
really. I had to resort to git update-ref. I'll look into that.
Michael
next prev parent reply other threads:[~2009-01-23 11:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 17:32 How to prefix existing svn remotes? Sébastien Mazy
2009-01-23 11:13 ` Michael J Gruber [this message]
2009-01-23 12:42 ` Sébastien Mazy
2009-01-23 13:02 ` Michael J Gruber
2009-01-23 17:13 ` Sébastien Mazy
2009-01-23 17:51 ` Jakub Narebski
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4979A64E.6030608@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=melyadon@gmail.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.