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

git-svn: Handling of branches created from subfolders

From
JTJan Teske <jan.teske@gmail.com>
Date
Aug 19, 2017, 12:45 UTC
Message-ID
<1ED00C5D-177C-4F95-8261-BFB7345B7C08@gmail.com>
Hello,
I’m trying to do a one-time conversion of a large SVN repository to git using git-svn. Unfortunately, this SVN repo contains a substantial amount of non-standard branches created from a subfolder of trunk/. Users that only need to work on part of the code inside the repo usually create such branches to avoid having to download unneeded files.
A toy example showing what I’m talking about:
trunk/
    - subfolder1/
        - …
    - subfolder2/
        - …
branches/
    - branch1/ (initially cp’ed from trunk/subfolder1)
        - …
    - branch2/ (initially cp’ed from trunk/subfolder2)
        - …
    - branch3/ (initially cp’ed from trunk)
        - …
While in my experience, git-svn is able to correctly handle branches/branch3, it fails on branch1 and branch2. By "fails" I mean that it still performs the conversion, but any relationship to the trunk is completely missing. Instead, in the resulting git repository it looks like those branches have a completely separate history, starting from nothing.
Is there any way to fix such branches from subfolders in a way that they integrate correctly with the converted git repository, without losing any (or at least too much) history? If this is not possible with git-svn directly, maybe I could prepare the SVN repo or post-process the converted git repository somehow?
Thanks!
    
Next: Andreas Heiduk
Message 1 of 3 in “git-svn: Handling of branches created from subfolders”
  1. Jan TeskeAug 19, 2017
  2. Andreas HeidukAug 20, 2017
  3. Jan TeskeAug 20, 2017

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.