add empty directories that existed in svn
Opened this issue · 1 comments
This is merely a suggestion (and might be heavy-handed, but I thought I would throw it out there). When migrating from svn, empty directories do not (and technically, cannot) get added to git because git doesn't store empty directories. My suggestion is to create the folder and place a .gitignore file with the following contents:
*
!.gitignore
This would at least allow the directory to get created in the new repo, because if an empty directory is committed to svn, the developer probably expects it to exist for the application code to be in a normal state.
I would be heavy-handed about this. Preserving empty dirs with a hidden dummy file really, really, should be the default, there's no reason for it not to be. The current behavior is very dangerous: It's exactly like you said: if an empty directory is there, you can safely assume it was put there for a reason. Silently "deleting" that (which is essentially what happens, even if not literally) can make bad things happen. A person can argue until they're blue in the face that "buildscripts should create needed directories if they don't exist", but it doesn't matter because the fact remains: SVN repos are maintained with the understanding that the repo isn't going to choke on basic things that have always been perfectly valid in every real-world filesystem in existence. SVN users have no reason to pretend empty directories can't exist, therefore many SVN projects are naturally going to be relying on that rather implicit assumption. Not taking that into account by default is just simply a bug, period.
I don't mean to be an ass about this, I just feel this needs to be taken very, very seriously.
(And at the very least it would avoid some support and PR issues for Git among new and prospective users.)