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

Allow string input rather than a path #6

Open
lisael opened this issue Nov 18, 2019 · 4 comments · Fixed by excitoon/gitignorefile#31
Open

Allow string input rather than a path #6

lisael opened this issue Nov 18, 2019 · 4 comments · Fixed by excitoon/gitignorefile#31

Comments

@lisael
Copy link

lisael commented Nov 18, 2019

Hi,

The premise of this issue is that I want to ignore patterns from .gitignore and .git/info/exclude as well (for local ignores). For performance reasons, it's probably better to use a single matcher for both files.

I noticed in #1 that you don't want to spend time on the project. Would you accept a PR of a small change that adds an function that take a file-like object as argument and does what's in parse_gitignore's with open(): block ?

@mherrmann
Copy link
Owner

I'd be open to this, however I don't understand the motivation. Couldn't you just do parse_gitignore('.git/info/exclude', base_dir='.')?

@lisael
Copy link
Author

lisael commented Nov 22, 2019

It's for an interactive app where performance matters. Also, from a usability standpoint, it's cumbersome to keep a list of matchers and match paths against each of them. BTW. it's not a great deal, I can abstract this in a method, but we can gain usability and user-freindliness for no price, so I may submit a PR some time.

@mherrmann
Copy link
Owner

Okay :)

@bitranox
Copy link

since I need a quick working solution, I made a fork ...
@hermann - I really dont want to make a hostile takeover, but You seem to be busy with other things - so I made a quick fork.
I will be happy to pass it back to You after quickly moving forward and stabilisation period.

@lisael - check out https://github.com/bitranox/igittigitt
and make Your PRs against that repo, I need to move on quickly.

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

Successfully merging a pull request may close this issue.

3 participants