While trying to clone an existing Subversion repository using git-svn using standard layout, I got a bunch of W: -empty_dir
(and W: +empty_dir
) warning
Without knowing exactly where those empty directories came from, you could tell git-svn
to remove them by using the --rmdir
command line option or svn.rmdir
configuration option.
See git-svn OPTIONS man page and
Remove directories from the SVN tree if there are no files left behind.
SVN can version empty directories, and they are not removed by default if there are no files left in them. git cannot version empty directories.
Enabling this flag will make the commit to SVN act like git.
The warning comes from SVN tags (which are "directories") not supported by git-svn, as in "git svn interrupted, then I lost all the tags, how to fix it?".
From this thread:
SVN tracks directories, git doesn't, so empty directories cannot be represented in git.
Those warnings on files seem to tell you which files that got deleted, causing an empty directory to be left in place, in that particularsvn commit
being imported.
The difference between -empty_dir
and +empty_dir
is about how the empty directory appears in the SVN repo:
-empty_dir
A bunch of files are deleted, leaving a directory (branch or tag) empty.
+empty_dir
An empty branch or tag has just been created in the SVN revision being imported, and git-svn
won't import an empty directory.
Note that you can restart the import after that warning.