git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
>
>
Previous: Mathieu ArnoldNext: Eric Wong
Message 2 of 10 in “problem with git worktree and git svn”
  1. Mathieu ArnoldOct 12, 2016
  2. Stefan BellerOct 12, 2016
  3. Eric WongOct 13, 2016
  4. Duy NguyenOct 13, 2016
  5. Eric WongOct 13, 2016
  6. 0/2 git-svn: implement "git worktree" awarenessEric Wong, Oct 14, 2016
  7. 2/2 git-svn: "git worktree" awarenessEric Wong, Oct 14, 2016
  8. 1/2 git-svn: reduce scope of input record separator changeEric Wong, Oct 14, 2016
  9. Eric WongOct 26, 2016
  10. Junio C HamanoOct 26, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.