-
Notifications
You must be signed in to change notification settings - Fork 425
Make Binding public #940
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
Make Binding public #940
Conversation
@edrevo You might need to rebase and ping the bot to make this PR get reviewed/merged. |
@rustbot ready |
#[doc(hidden)] | ||
/// Provides access to the raw libgit2 pointer to be able to interact with libgit2-sys. | ||
/// | ||
/// If you are going to depend on this trait on your code, do consider contributing to the git2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this being called out. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does exporting this trait sound? It would allow for an escape hatch to be able to interact with libgit2-sys.
I think the change is small and fine to merge. However, I'd like to understand what can't be done or hard to do before this patch. Would you mind showing some examples of before and after?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I initially pinged @edrevo to update the PR and ping rustbot to get it merged was because of WorktreeAddOptions
missing an API to set checkout_options
.
I ended up solving it a different way and I was in fact holding it wrong, but giving the user the capability to access the underlying C-API seems generally useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks!
Fixes #928
This allows users to use the libgit2-sys binding for things that might not have git2 support yet.