-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
generator implementation issue with libgit2 #183
Comments
I had a crack at this when I did git_object_foreach. Currently I'm building a list because I could get it out quickly, and I needed the functionality, but python does support the iter protocol which does what's needed here. The code got pretty hairy reasonably quick but I'm happy to have another stab at it. |
|
@cholin I peeked at creating a callback-free version of the config API and (as you probably noticed) it will require changes all the way into the config storage backend abstraction, I fear. If you are interested in pursuing it, I'd open an issue on libgit2/libgit2 and specifically cc @ethomson to ask his thoughts on API changes for the config storage backend object. One potential nice thing is that if we replace the existing foreach() callback with a simpler enumeration API, things like the pattern matching behavior could possibly be moved into common code instead of having to be supported by each backend implementation. |
I wanted to get a closer look at this in the next days. I already talked to @carlosmn about git_config (and the default backend). Would be great if you can open an issue for that! |
As you may have noticed there are some problems to implement a python generator with these
*_foreach
iterators of libgit2. I've opened an issue libgit2/libgit2#1384 for that. I'll let this issue open to collect some problematic_foreach
functions. For the moment there are:git_references_foreach
git_note_foreach
Diff seems to support as well some old fashioned way of iterating (not callback based). I'll look into that.
The text was updated successfully, but these errors were encountered: