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

Whitelist/Include mode. #219

Open
artem-zinnatullin opened this issue Apr 20, 2018 · 7 comments
Open

Whitelist/Include mode. #219

artem-zinnatullin opened this issue Apr 20, 2018 · 7 comments
Assignees

Comments

@artem-zinnatullin
Copy link
Contributor

On our big project I'm constantly facing issue of syncing too much unnecessary data thus have to explicitly ignore lots of different entries.

Another problem is that if you change some source files locally during remote execution, Mainframer can override them with remote version after Sync remote → local machine...

To solve these issues we can give users a way to mix following rsync options:

--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE read exclude patterns from FILE
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE read include patterns from FILE

So I could put * in .mainframer/remoteignore and then put build (to sync Gradle build output for example) in .mainframer/remoteinclude

@ming13 WDYT?

@artem-zinnatullin
Copy link
Contributor Author

This won't be a breaking change btw

@Pozzoooo
Copy link

Global configuration are quite useful here :)

For the sync back I've added *.kt and *.java in the localignore

@artem-zinnatullin
Copy link
Contributor Author

Yeah, in my case there are also files with no pattern in them

Also excluding everything by default and whitelisting what you want to sync might make rsync faster during fs lookup, I'll need to benchmark this though

@artem-zinnatullin artem-zinnatullin self-assigned this Apr 21, 2018
@arturdryomov
Copy link
Contributor

Sounds good, but isn’t it gonna complicate things by a certain magnitude? I. e. you should keep in mind which files are included and excluded and what the resolution would be in the end. I’m talking about the user perspective BTW.

What about a radical idea to replace excludes with includes only?

@artem-zinnatullin
Copy link
Contributor Author

Well, yeah I've thought about includes-only but idk, you can get exact same problem but upside down.

What I like about current proposal is that it's not breaking change or complication, but rather an additional feature.

Also, git has similar concept with ! to unignore stuff.

@arturdryomov
Copy link
Contributor

Then sure thing, let’s do it!

@artem-zinnatullin artem-zinnatullin removed this from the v3.0.0 milestone Oct 15, 2018
@vganin
Copy link

vganin commented Sep 2, 2019

Hi, is this feature going to make to 2.x? It might come very handy.

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

No branches or pull requests

4 participants