sun / wordpress-git-svn-release

Release a WordPress plugin from git to svn
15 stars 4 forks source link

Script doesn't delete empty directories on SVN #7

Open r-a-y opened 10 years ago

r-a-y commented 10 years ago

Hi sun,

Just tested your fork for the WP git-svn script and it works nicely!

I just came across a minor bug where empty directories are not being removed on SVN. The script does remove files, but doesn't remove directories once no files are present in them.

sun commented 10 years ago

Yeah, git has no notion (at all) of directories. It only knows about files. (That's why you can't commit an empty directory to git.)

I guess we could try to amend the dump-export process with something along the lines of this?

# Find and delete all empty directories after synchronizing files.
find -type d -empty -exec svn delete '{}' ';'