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

Exclude certain files from upload #18

Open
kbjr opened this issue Jan 26, 2011 · 13 comments
Open

Exclude certain files from upload #18

kbjr opened this issue Jan 26, 2011 · 13 comments

Comments

@kbjr
Copy link

kbjr commented Jan 26, 2011

Add an option to exclude certain files from the upload, perhaps in the form of a git-ftp specific .gitignore file.

@ezyang
Copy link
Owner

ezyang commented Jan 26, 2011

I suggest naming it .gitftpignore or .ftpignore (any preferences?). It would be nice if it followed the same syntax as .gitignore but reimplementing that parser might be nontrivial.

@kbjr
Copy link
Author

kbjr commented Jan 26, 2011

i like .gitftpignore imho.

@Janghou
Copy link

Janghou commented Jan 27, 2011

or call it from ftpdata:
gitftpignore=.gitftpignore

Gives you the power to set different files for different branches or FTP servers.

@mrshu
Copy link

mrshu commented Feb 12, 2011

I agree with Janghou, simple yet powerful solution

And .gitftpignore can be default file if gitftpignore can not be found in ftpdata

@peteruhnak
Copy link
Contributor

Is there any progress on this issue since last year? Due to .gitignore's manpage it uses only few simple rules and fnmatch() function so it shouldn't be that hard.

@ezyang
Copy link
Owner

ezyang commented Jan 3, 2012

Nope, no one has been working on it.

@niklasf
Copy link
Contributor

niklasf commented Jan 8, 2012

How would we handle submodules? One .gitftpignore in the root repo (my +1 here), or one per module?

Would we upload .gitftpignore files to the server? If no: Because of that special name, or because of the name set in ftpdata? If yes: Ok, users can still add .gitftpignore to .gitftpignore.

@peteruhnak
Copy link
Contributor

I think the question should be one .gitftpignore in the root (+1 here as well) or in any directory – much like .gitignore. Also I don't see any reason to upload .gitftpignore files. Why would anyone need them there? Or you want them there so you can control what is uploaded? Eg. different .ftpignore in staging and production server.

@niklasf
Copy link
Contributor

niklasf commented Jan 9, 2012

Oh ... I didn't realize you could have multiple .gitignores. Not sure then anymore. But we can always start with the easier one, which would also be enough for any use case I have.

And ok, we should not upload the ignore files to the FTP server. We can have the same feature with @Janghou's suggestion.

I think I'll play with this a little.

@peteruhnak
Copy link
Contributor

What about to use .gitftpignore in root, unless other file in ftpdata is specified? I am actually almost done with the implementation but I haven't tested submodules yet.

@niklasf
Copy link
Contributor

niklasf commented Jan 10, 2012

Oh ... that looks quite good. Made a few comments, also.

Submodules use upload_diff recursively. If the ignored parameter was optional, it at least wouldn't break them. But they also wouldn't work as expected, because the pathnames of the diff will be against the root of the current submodule, not the root where .gitfptignore lies.

@peteruhnak
Copy link
Contributor

We could either allow to have .gitftpignore in any directory (or just one per (sub)module), but will the submodules inherit rules from parent? If yes, then we don't really need them, we could just join path with parent and match against it. If no, wouldn't it just get too messy because you have to track of several ignore files just so you can upload what you need? But it's more question of use case.

Also if we allow more than one .gitftpignore then specifying it's name in ftpdata is pretty much pointless.

@niklasf
Copy link
Contributor

niklasf commented Jan 10, 2012

Mhh ... I'd vote for a single ignore file in the root of the main repository. Only problem: Submodules need to know the path relative to the root. That would we one more parameter to upload_diff.

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

6 participants