git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Baumann <waste.manager@gmx.de>
To: Miklos Vajna <vmiklos@frugalware.org>
Cc: git@vger.kernel.org
Subject: Re: git-svn branch naming question
Date: Sat, 8 Dec 2007 17:56:57 +0100	[thread overview]
Message-ID: <20071208165657.GC2844@xp.machine.xx> (raw)
In-Reply-To: <20071208141449.GH3199@genesis.frugalware.org>

On Sat, Dec 08, 2007 at 03:14:49PM +0100, Miklos Vajna wrote:
> On Sat, Dec 08, 2007 at 11:59:01AM +0100, Peter Baumann <waste.manager@gmx.de> wrote:
> > Look up  --prefix in the manpage for git-svn.
> 
> great, --prefix is what i missed.
> 
> a related question: is it possible to avoid even the "remotes" prefix?
> 
> it could be useful when creating an incremental import of an svn repo.
> (ie when using git-svn as a replacement of git-svnimport.)
> 

git svn init --stdlayout creates this entry in your .git/config per default

  [svn-remote "svn"]
        url = https://url/to/your/svn/repo
        fetch = trunk:refs/remotes/trunk
        branches = branches/*:refs/remotes/*
        tags = tags/*:refs/remotes/tags/*

You could change this to

  [svn-remote "svn"]
        url = https://url/to/your/svn/repo
        fetch = trunk:refs/remotes/origin/trunk
        branches = branches/*:refs/remotes/origin/*
        tags = tags/*:refs/remotes/origin/tags/*

to get what --prefix origin would do.


 On the other hand you could forget completly the remote part by specifying

  [svn-remote "svn"]
        url = https://url/to/your/svn/repo
        fetch = trunk:refs/heads/trunk
        branches = branches/*:refs/heads/*
        tags = tags/*:refs/heads/tags/*

but I advice you to not do this. refs/remotes has a special meaning in git,
e.g.  you can't commit directly to it (which makes sense, because it only
tracks the state of the remote repo. On the other hand remote branches won't
get cloned per default.)

Side note, if you want to track only some branches, or if you have a strange
svn layout, you could use something like this:

  [svn-remote "svn"]
        url = https://url/to/your/svn/repo
        fetch = trunk:refs/remotes/origin/trunk
        fetch = branches/branchA:refs/remotes/origin/branchA
        fetch = branches/branchB:refs/remotes/origin/branchB
	...


-Peter

  reply	other threads:[~2007-12-08 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-08  1:04 git-svn branch naming question Miklos Vajna
2007-12-08 10:59 ` Peter Baumann
2007-12-08 14:14   ` Miklos Vajna
2007-12-08 16:56     ` Peter Baumann [this message]
2007-12-08 23:52       ` Miklos Vajna
2007-12-09  2:05         ` Miklos Vajna
2007-12-09  2:13           ` Björn Steinbrink
2007-12-09  2:25             ` Miklos Vajna
2007-12-09  2:26           ` Eric Wong
2007-12-09  2:36             ` Miklos Vajna
2007-12-09  3:26               ` Eric Wong
2007-12-09  5:16                 ` Harvey Harrison
2007-12-09 19:36                 ` Miklos Vajna

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=20071208165657.GC2844@xp.machine.xx \
    --to=waste.manager@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=vmiklos@frugalware.org \
    /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 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 NNTP newsgroup(s).