threads / discuss / 33628

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

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

## tl;dr

2 messages between Apr 27, 2013 and Apr 27, 2013.

replies: 1people: 1as markdown or json

Ilya Basin· Apr 27, 2013, 07:28 UTC · lore
Hi.
I ran 'git svn init', then
    git config svn-remote.svn.preserve-empty-dirs true
    git config svn-remote.svn.placeholder-filename ".gitignore"
then 'git svn fetch' and I get this:
    ...
    r897 = dc26a4628a0e1fb79452a3f1953fbdc1feae69d1 (refs/remotes/svn/trunk)
            M       pom.xml
    Failed to strip path 'ADDBackEnd/api/src/main/java/com/sicap/dmc/addbe/api/services/local/.gitignore' ((?-xism:^trunk(/|$)))
Ilya Basin· Apr 27, 2013, 15:05 UTC · re: Ilya Basin · lore

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

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

← back to recent threads