Created
September 15, 2011 10:52
-
-
Save luisfaceira/1218997 to your computer and use it in GitHub Desktop.
Oneliner to prepare empty directories for svn2git conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find -not -path "*/.svn/*" -type d -empty -exec sh -c "echo This directory was empty. This file let's it be git-compatible. > {}/README.emptydir" \; |
In svn there actually exists no empty dir since every single on has the hidden ".svn" folder, so this way of searching them won't work on a checked out repo, just on an export.
This means there are some adaptations needed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anything is found, one must also add those just-created files with svn-add. Not sure how to that in the one-liner inside the find's exec option.