Re: problem with git worktree and git svn
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 12, 2016, 21:05 UTC
- Message-ID
- <CAGZ79kZo5W1r0s26G3foB7caP6+u66mdzqzyneqXBX_B7A0RKg@mail.gmail.com>
- In-Reply-To
- <6c83c905-b10a-7f54-873f-54186faacfc8@FreeBSD.org>
+cc Duy who knows about worktree, +cc Eric Wong, who knows about git-svn
On Wed, Oct 12, 2016 at 7:45 AM, Mathieu Arnold <mat@freebsd.org> wrote:
Show 17 quoted lines
> Hi, > > I'm a FreeBSD ports developer, and while our main repository is in > Subversion, some of us use git-svn a lot for development. > > I discovered git worktree earlier this week, and I found it a great > asset to be able to have more than one branch of my worktree accessible > at the same time... > > Anyway, back to my problem, the way git-svn works, is that it looks for > a directory named "svn" in its gitdir and if it is not present, decide > the repository is using git-svn version 1 (whatever that is) and goes to > parse all the revisions to recreate the svn directory. > So I can only use git svn commands in my main worktree, the one with the > real gitdir. > To fix that, all I had to do is to add a symlink named svn in each > worktree's gitdir and pointing to ../../svn.
For some definition of fix. ;) Sure it fixes your local setup now, but would we want to use that as well here? My gut reaction:
* not all platforms know symlinks * IIRC there is some worktree magic that tells you the "main" dir, so if that was used in git-svn instead it should "just work".
Show 9 quoted lines
> > I think all that needs to happen is that when adding a new worktree, if > the main git directory has a "svn" directory, add a symlink to it in the > worktree's gitdir. > > -- > Mathieu Arnold > >