Subject: git-svn does not honor preserve-empty-dirs

From: Andreas Dröscher <[email-masked]>
Date: Mon, 14 Dec 2015 22:56:01 +0100

Hi

I think git-svn 2.6.4 does not behave as intended.

According to the documentation preserve-empty-dirs should ensure that empty-
directories are kept in all cases: "Create a placeholder file in the local Git
repository for each empty directory fetched from Subversion. This includes
directories that become empty by removing all entries in the Subversion
repository (but not the directory itself)."

I've attached an svn repo to demonstrate the issue. Everything goes fine
during the first 3 commits. In commit r4 a file is removed from the demo
folder, but not the directory. This works in svn but not in git.

Steps to Reproduce:
1. Extract tar to a directory of your choice e.g. /tmp/svn/
2. git svn clone --stdlayout --preserve-empty-dirs file:///tmp/svn/
3. Now trunk is empty. However the directory demo should have been preserved.

I'm not a member of the mailing-list. Please CC me.

Best Wishes
Andreas

SVN Commit Log:
------------------------------------------------------------------------
r4 | andreas | 2015-12-14 22:52:49 +0100 (Mo, 14. Dez 2015) | 1 Zeile

empty dir
------------------------------------------------------------------------
r3 | andreas | 2015-12-14 22:52:22 +0100 (Mo, 14. Dez 2015) | 1 Zeile

fill dir
------------------------------------------------------------------------
r2 | andreas | 2015-12-14 22:51:39 +0100 (Mo, 14. Dez 2015) | 1 Zeile

add empty dir demo
------------------------------------------------------------------------
r1 | andreas | 2015-12-14 22:50:46 +0100 (Mo, 14. Dez 2015) | 1 Zeile

initial import
------------------------------------------------------------------------