Subject: Re: git-svn --preserve-empty-dirs: Failed to strip path

From: Ilya Basin <[email-masked]>
Date: Sat, 27 Apr 2013 19:05:16 +0400

Small test script:

    rm -rf testrepo.svn testrepo.gitsvn
    svnadmin create testrepo.svn
    url=file://`pwd`/testrepo.svn

    svn mkdir -m "" "$url/trunk" "$url/branches" "$url/tags"
    rm -rf testrepo
    svn co "$url" testrepo
    cd testrepo/trunk

    mkdir -p foo/bar/
    svn add foo/
    svn commit -mx

    svn rm foo/bar/
    svn commit -mx

    svn up
    mkdir -p baz/
    svn add baz/
    svn commit -mx

    echo x > fil.txt
    svn add fil.txt
    svn commit -mx

    cd ../..

    git svn clone --stdlayout --preserve-empty-dirs "$url" testrepo.gitsvn

result:

    Initialized empty Git repository in /tmp/testrepo.gitsvn/.git/
    r1 = 677463d6218c2229f81a8d891479435250cb9c87 (refs/remotes/trunk)
    r2 = f61c011cc800eaa9953026b8bd4534c9cc7825a8 (refs/remotes/trunk)
            D       foo/bar/.gitignore
            D       foo/bar/
    W: -empty_dir: trunk/foo/bar
    r3 = b674724183fe4960b1b10813c41a91c5b22e805e (refs/remotes/trunk)
    r4 = 8b1c8fdbf9b43390efb37b053c868a5f40567249 (refs/remotes/trunk)
            A       fil.txt
    Failed to strip path 'foo/.gitignore' ((?-xism:^trunk(/|$)))

git version 1.8.2

--