How to prevent git svn rebase from creating empty directories

In short, the problem is that when I started git svn rebase, I got a bunch of "creating an empty directory: ..."

On the svn side of the trunk, there is a directory called TOD (Trunk Only Dir), which has a lot of files. in another branch there is no such directory at all.

When I cloned this svn repository using git svn, the main things are fine, but on the branch I got the TOD directory and the same directory structure, except that it does not have files.

If I rm the TOD directory (safe because git does not track directories) and switch to master and run git svn rebase, I get "create empty direcotry" messages and then when I check the branch, the TOD directory is returned.

In general, the question is how to prevent git svn from creating empty TOD directories on the branch?

+5
source share
1 answer

I believe that @ ben-tebulin is right in doing

git config svn-remote.svn.automkdirs false
git config svn.rmdir true

should fix it. Unfortunately, I soon switched to other projects and did not have the opportunity to test it.

At the time of this writing, I almost lost my svn-fu, did a test and could not reproduce the problem, and looks like git-svn can now switch between branches cleanly.

+5
source

All Articles