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

Investigate the best way to circumvent reading the .gitattributes per check/fliter #3

Closed
cjhoward92 opened this issue Jul 26, 2017 · 4 comments

Comments

@cjhoward92
Copy link
Contributor

Find a way to determine if the current .gitattributes files has changed so we potentially only have to read it one time per repo, and will be notified if something changes. We could look at using the index and any caches it may have to determine if the file has changed.

@cjhoward92
Copy link
Contributor Author

@jgrosso I am interested in your opinion on this. The check.js file reads the .gitattributes each time we check a file. You can imagine this incurs some overhead. An obvious improvement is to avoid this. Not sure how to best cache the filters, though. Needs to change per repo and needs to change when the file changes. I think the check callback gets the repo instance but I need to verify. I know smudge and clean do.

@jgrosso
Copy link
Contributor

jgrosso commented Sep 15, 2017

Re: watching .gitattributes for changes, would https://github.com/Axosoft/nsfw work?
Whenever that changes, we could parse out the filters and store them wherever. (Whenever a repo changes, we'd setup a listener on the new .gitattributes file and go from there).
Would this serve our needs, do you think?

@cjhoward92
Copy link
Contributor Author

Yeah nsfw could work. We will check it out. Not sure the overhead of adding in nsfw. It feels a bit weird for a NodeGit augmentation library to spawn an nsfw instance.

@cjhoward92
Copy link
Contributor Author

Updated to use NodeGit.Attr.get

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