Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add empty directories that existed in svn #6

Open
mattsawyer77 opened this issue Dec 12, 2011 · 1 comment
Open

add empty directories that existed in svn #6

mattsawyer77 opened this issue Dec 12, 2011 · 1 comment

Comments

@mattsawyer77
Copy link

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.

@Abscissa
Copy link

Abscissa commented Jan 8, 2012

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants